From 31735a7bd726c0c50230297e2564b083e5111a39 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Sep 2019 03:46:39 -0700 Subject: [PATCH] feat: additional safe search confidence fields (#444) --- .../cloud/vision/v1/image_annotator.proto | 103 +++-- .../cloud/vision/v1/product_search.proto | 5 +- .../vision/v1/product_search_service.proto | 333 +++++++++----- .../cloud/vision/v1/text_annotation.proto | 7 +- protos/protos.json | 416 ++++++++++++++---- .../cloud/vision/v1/doc_image_annotator.js | 96 ++-- .../cloud/vision/v1/doc_product_search.js | 3 +- .../vision/v1/doc_product_search_service.js | 81 ++-- .../cloud/vision/v1/doc_text_annotation.js | 5 +- src/v1/image_annotator_client.js | 8 +- src/v1/product_search_client.js | 78 ++-- synth.metadata | 6 +- 12 files changed, 779 insertions(+), 362 deletions(-) diff --git a/protos/google/cloud/vision/v1/image_annotator.proto b/protos/google/cloud/vision/v1/image_annotator.proto index e4ca1539..6cff8dde 100644 --- a/protos/google/cloud/vision/v1/image_annotator.proto +++ b/protos/google/cloud/vision/v1/image_annotator.proto @@ -19,6 +19,7 @@ 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"; @@ -47,8 +48,7 @@ service ImageAnnotator { "https://www.googleapis.com/auth/cloud-vision"; // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { option (google.api.http) = { post: "/v1/images:annotate" body: "*" @@ -61,6 +61,7 @@ service ImageAnnotator { body: "*" } }; + option (google.api.method_signature) = "requests"; } // Service that performs image detection and annotation for a batch of files. @@ -70,8 +71,7 @@ service ImageAnnotator { // 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) { + rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) { option (google.api.http) = { post: "/v1/files:annotate" body: "*" @@ -84,6 +84,7 @@ service ImageAnnotator { body: "*" } }; + option (google.api.method_signature) = "requests"; } // Run asynchronous image detection and annotation for a list of images. @@ -95,8 +96,7 @@ service ImageAnnotator { // // 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) { + rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/images:asyncBatchAnnotate" body: "*" @@ -109,6 +109,11 @@ service ImageAnnotator { 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 @@ -117,8 +122,7 @@ service ImageAnnotator { // `google.longrunning.Operations` interface. // `Operation.metadata` contains `OperationMetadata` (metadata). // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) - returns (google.longrunning.Operation) { + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/files:asyncBatchAnnotate" body: "*" @@ -131,6 +135,11 @@ service ImageAnnotator { body: "*" } }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -557,6 +566,30 @@ message SafeSearchAnnotation { // covered nudity, lewd or provocative poses, or close-ups of sensitive // body areas. Likelihood racy = 9; + + // Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float adult_confidence = 16; + + // Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float spoof_confidence = 18; + + // Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float medical_confidence = 20; + + // Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means + // very confident. + float violence_confidence = 22; + + // Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very + // confident. + float racy_confidence = 24; + + // Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very + // confident. + float nsfw_confidence = 26; } // Rectangle determined by min and max `LatLng` pairs. @@ -732,28 +765,10 @@ message AnnotateImageResponse { 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. 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; -} - // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // 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. // @@ -804,11 +819,29 @@ message AnnotateFileRequest { 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 { - // The list of file annotation requests. Right now we support only one + // Required. The list of file annotation requests. Right now we support only one // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileRequest requests = 1; + repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Target project and location to make a call. // @@ -855,11 +888,11 @@ message AsyncAnnotateFileResponse { // Request for async image annotation for a list of images. message AsyncBatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // 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; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Target project and location to make a call. // @@ -885,8 +918,8 @@ message AsyncBatchAnnotateImagesResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // 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. // diff --git a/protos/google/cloud/vision/v1/product_search.proto b/protos/google/cloud/vision/v1/product_search.proto index 28d36abb..bede95be 100644 --- a/protos/google/cloud/vision/v1/product_search.proto +++ b/protos/google/cloud/vision/v1/product_search.proto @@ -17,10 +17,10 @@ syntax = "proto3"; package google.cloud.vision.v1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1/geometry.proto"; import "google/cloud/vision/v1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; @@ -35,8 +35,7 @@ message ProductSearchParams { // Optional. 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. + // 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`. diff --git a/protos/google/cloud/vision/v1/product_search_service.proto b/protos/google/cloud/vision/v1/product_search_service.proto index a892a6fb..72657399 100644 --- a/protos/google/cloud/vision/v1/product_search_service.proto +++ b/protos/google/cloud/vision/v1/product_search_service.proto @@ -19,6 +19,8 @@ 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"; @@ -36,18 +38,16 @@ 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. +// - 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 +// - 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 +// - 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"; @@ -66,6 +66,7 @@ service ProductSearch { 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. @@ -74,11 +75,11 @@ service ProductSearch { // // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less // than 1. - rpc ListProductSets(ListProductSetsRequest) - returns (ListProductSetsResponse) { + 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. @@ -90,6 +91,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a ProductSet resource. @@ -105,17 +107,18 @@ service ProductSearch { 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) { + 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. @@ -131,6 +134,7 @@ service ProductSearch { post: "/v1/{parent=projects/*/locations/*}/products" body: "product" }; + option (google.api.method_signature) = "parent,product,product_id"; } // Lists products in an unspecified order. @@ -142,6 +146,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/products" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a Product. @@ -153,6 +158,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a Product resource. @@ -175,6 +181,7 @@ service ProductSearch { 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. @@ -186,6 +193,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new ReferenceImage resource. @@ -207,12 +215,12 @@ service ProductSearch { // * 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) { + 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. @@ -222,11 +230,11 @@ service ProductSearch { // caches are refreshed. // // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteReferenceImage(DeleteReferenceImageRequest) - returns (google.protobuf.Empty) { + 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. @@ -236,11 +244,11 @@ service ProductSearch { // * 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) { + 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. @@ -262,21 +270,21 @@ service ProductSearch { // Possible errors: // // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - rpc AddProductToProductSet(AddProductToProductSetRequest) - returns (google.protobuf.Empty) { + 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) { + 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 @@ -286,30 +294,34 @@ service ProductSearch { // Possible errors: // // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProductsInProductSet(ListProductsInProductSetRequest) - returns (ListProductsInProductSetResponse) { + 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. + // 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) { + 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 @@ -333,20 +345,29 @@ service ProductSearch { // 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. + // 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) { + 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 @@ -374,13 +395,11 @@ message Product { // characters long. string description = 3; - // The category for the product identified by the reference image. This should + // Immutable. The category for the product identified by the reference image. This should // be either "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. - // - // This field is immutable. - string product_category = 4; + 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. @@ -402,6 +421,11 @@ message Product { // 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: @@ -420,18 +444,23 @@ message ProductSet { // "1970-01-01T00:00:00Z". // // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3; + 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.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: @@ -441,34 +470,37 @@ message ReferenceImage { // This field is ignored when creating a reference image. string name = 1; - // The Google Cloud Storage URI of the reference image. + // Required. The Google Cloud Storage URI of the reference image. // // The URI must start with `gs://`. - // - // Required. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; - // Bounding polygons around the areas of interest in the reference image. - // Optional. If this field is empty, the system will try to detect regions of + // 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; + repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `CreateProduct` method. message CreateProductRequest { - // The project in which the Product should be created. + // Required. The project in which the Product should be created. // // Format is // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The product to create. - Product product = 2; + // 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 @@ -479,11 +511,16 @@ message CreateProductRequest { // Request message for the `ListProducts` method. message ListProductsRequest { - // The project OR ProductSet from which Products should be listed. + // Required. The project OR ProductSet from which Products should be listed. // // Format: // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1; + 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; @@ -504,18 +541,23 @@ message ListProductsResponse { // Request message for the `GetProduct` method. message GetProductRequest { - // Resource name of the Product to get. + // Required. Resource name of the Product to get. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + 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 { - // The Product resource which replaces the one on the server. + // Required. The Product resource which replaces the one on the server. // product.name is immutable. - Product product = 1; + Product product = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields // to update. @@ -527,22 +569,32 @@ message UpdateProductRequest { // Request message for the `DeleteProduct` method. message DeleteProductRequest { - // Resource name of product to delete. + // Required. Resource name of product to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + 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 { - // The project in which the ProductSet should be created. + // Required. The project in which the ProductSet should be created. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The ProductSet to create. - ProductSet product_set = 2; + // 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 @@ -553,10 +605,15 @@ message CreateProductSetRequest { // Request message for the `ListProductSets` method. message ListProductSetsRequest { - // The project from which ProductSets should be listed. + // Required. The project from which ProductSets should be listed. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + 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; @@ -577,17 +634,22 @@ message ListProductSetsResponse { // Request message for the `GetProductSet` method. message GetProductSetRequest { - // Resource name of the ProductSet to get. + // Required. Resource name of the ProductSet to get. // // Format is: // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` - string name = 1; + 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 { - // The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1; + // 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. @@ -598,24 +660,34 @@ message UpdateProductSetRequest { // Request message for the `DeleteProductSet` method. message DeleteProductSetRequest { - // Resource name of the ProductSet to delete. + // Required. Resource name of the ProductSet to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + 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 { - // Resource name of the product in which to create the reference image. + // 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; - - // The reference image to create. + 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; + 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 @@ -626,11 +698,16 @@ message CreateReferenceImageRequest { // Request message for the `ListReferenceImages` method. message ListReferenceImagesRequest { - // Resource name of the product containing the reference images. + // Required. Resource name of the product containing the reference images. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + 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; @@ -656,61 +733,96 @@ message ListReferenceImagesResponse { // Request message for the `GetReferenceImage` method. message GetReferenceImageRequest { - // The resource name of the ReferenceImage to get. + // 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; + 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 { - // The resource name of the reference image to delete. + // 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; + 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 { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be added to this 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; + 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 { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be removed from this 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; + 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 { - // The ProductSet resource for which to retrieve Products. + // Required. The ProductSet resource for which to retrieve Products. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + 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; @@ -757,17 +869,15 @@ message ImportProductSetsGcsSource { // `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]. + // [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. + // 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` @@ -810,22 +920,25 @@ message ImportProductSetsInputConfig { // Request message for the `ImportProductSets` method. message ImportProductSetsRequest { - // The project in which the ProductSets should be imported. + // Required. The project in which the ProductSets should be imported. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; - - // The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2; + 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. +// [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; @@ -872,8 +985,7 @@ message BatchOperationMetadata { 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.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. google.protobuf.Timestamp end_time = 3; } @@ -897,10 +1009,15 @@ message PurgeProductsRequest { bool delete_orphan_products = 3; } - // The project and location in which the Products should be deleted. + // Required. The project and location in which the Products should be deleted. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + 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. diff --git a/protos/google/cloud/vision/v1/text_annotation.proto b/protos/google/cloud/vision/v1/text_annotation.proto index 09459b90..97f9c8fa 100644 --- a/protos/google/cloud/vision/v1/text_annotation.proto +++ b/protos/google/cloud/vision/v1/text_annotation.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.vision.v1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1/geometry.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; @@ -32,9 +32,8 @@ option objc_class_prefix = "GCVN"; // 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. +// 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 { diff --git a/protos/protos.json b/protos/protos.json index 8bf63bd0..8266f2a9 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -29,7 +29,8 @@ "(google.api.http).post": "/v1/images:annotate", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*}/images:annotate", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "requests" } }, "BatchAnnotateFiles": { @@ -39,7 +40,8 @@ "(google.api.http).post": "/v1/files:annotate", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*}/files:annotate", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "requests" } }, "AsyncBatchAnnotateImages": { @@ -49,7 +51,10 @@ "(google.api.http).post": "/v1/images:asyncBatchAnnotate", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*}/images:asyncBatchAnnotate", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "requests,output_config", + "(google.longrunning.operation_info).response_type": "AsyncBatchAnnotateImagesResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } }, "AsyncBatchAnnotateFiles": { @@ -59,7 +64,10 @@ "(google.api.http).post": "/v1/files:asyncBatchAnnotate", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*}/files:asyncBatchAnnotate", - "(google.api.http).additional_bindings.body": "*" + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "requests", + "(google.longrunning.operation_info).response_type": "AsyncBatchAnnotateFilesResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } } } @@ -367,6 +375,30 @@ "racy": { "type": "Likelihood", "id": 9 + }, + "adultConfidence": { + "type": "float", + "id": 16 + }, + "spoofConfidence": { + "type": "float", + "id": 18 + }, + "medicalConfidence": { + "type": "float", + "id": 20 + }, + "violenceConfidence": { + "type": "float", + "id": 22 + }, + "racyConfidence": { + "type": "float", + "id": 24 + }, + "nsfwConfidence": { + "type": "float", + "id": 26 } } }, @@ -577,33 +609,15 @@ } } }, - "AnnotateFileResponse": { - "fields": { - "inputConfig": { - "type": "InputConfig", - "id": 1 - }, - "responses": { - "rule": "repeated", - "type": "AnnotateImageResponse", - "id": 2 - }, - "totalPages": { - "type": "int32", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - } - } - }, "BatchAnnotateImagesRequest": { "fields": { "requests": { "rule": "repeated", "type": "AnnotateImageRequest", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "parent": { "type": "string", @@ -642,12 +656,36 @@ } } }, + "AnnotateFileResponse": { + "fields": { + "inputConfig": { + "type": "InputConfig", + "id": 1 + }, + "responses": { + "rule": "repeated", + "type": "AnnotateImageResponse", + "id": 2 + }, + "totalPages": { + "type": "int32", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + } + } + }, "BatchAnnotateFilesRequest": { "fields": { "requests": { "rule": "repeated", "type": "AnnotateFileRequest", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "parent": { "type": "string", @@ -698,11 +736,17 @@ "requests": { "rule": "repeated", "type": "AnnotateImageRequest", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "outputConfig": { "type": "OutputConfig", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "parent": { "type": "string", @@ -723,7 +767,10 @@ "requests": { "rule": "repeated", "type": "AsyncAnnotateFileRequest", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "parent": { "type": "string", @@ -971,21 +1018,24 @@ "responseType": "ProductSet", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/productSets", - "(google.api.http).body": "product_set" + "(google.api.http).body": "product_set", + "(google.api.method_signature)": "parent,product_set,product_set_id" } }, "ListProductSets": { "requestType": "ListProductSetsRequest", "responseType": "ListProductSetsResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/productSets" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/productSets", + "(google.api.method_signature)": "parent" } }, "GetProductSet": { "requestType": "GetProductSetRequest", "responseType": "ProductSet", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/productSets/*}" + "(google.api.http).get": "/v1/{name=projects/*/locations/*/productSets/*}", + "(google.api.method_signature)": "name" } }, "UpdateProductSet": { @@ -993,14 +1043,16 @@ "responseType": "ProductSet", "options": { "(google.api.http).patch": "/v1/{product_set.name=projects/*/locations/*/productSets/*}", - "(google.api.http).body": "product_set" + "(google.api.http).body": "product_set", + "(google.api.method_signature)": "product_set,update_mask" } }, "DeleteProductSet": { "requestType": "DeleteProductSetRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/productSets/*}" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/productSets/*}", + "(google.api.method_signature)": "name" } }, "CreateProduct": { @@ -1008,21 +1060,24 @@ "responseType": "Product", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/products", - "(google.api.http).body": "product" + "(google.api.http).body": "product", + "(google.api.method_signature)": "parent,product,product_id" } }, "ListProducts": { "requestType": "ListProductsRequest", "responseType": "ListProductsResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/products" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/products", + "(google.api.method_signature)": "parent" } }, "GetProduct": { "requestType": "GetProductRequest", "responseType": "Product", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/products/*}" + "(google.api.http).get": "/v1/{name=projects/*/locations/*/products/*}", + "(google.api.method_signature)": "name" } }, "UpdateProduct": { @@ -1030,14 +1085,16 @@ "responseType": "Product", "options": { "(google.api.http).patch": "/v1/{product.name=projects/*/locations/*/products/*}", - "(google.api.http).body": "product" + "(google.api.http).body": "product", + "(google.api.method_signature)": "product,update_mask" } }, "DeleteProduct": { "requestType": "DeleteProductRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/products/*}" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/products/*}", + "(google.api.method_signature)": "name" } }, "CreateReferenceImage": { @@ -1045,21 +1102,24 @@ "responseType": "ReferenceImage", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*/products/*}/referenceImages", - "(google.api.http).body": "reference_image" + "(google.api.http).body": "reference_image", + "(google.api.method_signature)": "parent,reference_image,reference_image_id" } }, "DeleteReferenceImage": { "requestType": "DeleteReferenceImageRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}", + "(google.api.method_signature)": "name" } }, "ListReferenceImages": { "requestType": "ListReferenceImagesRequest", "responseType": "ListReferenceImagesResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/products/*}/referenceImages", + "(google.api.method_signature)": "parent" } }, "GetReferenceImage": { @@ -1074,7 +1134,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).post": "/v1/{name=projects/*/locations/*/productSets/*}:addProduct", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,product" } }, "RemoveProductFromProductSet": { @@ -1082,14 +1143,16 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).post": "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,product" } }, "ListProductsInProductSet": { "requestType": "ListProductsInProductSetRequest", "responseType": "ListProductsInProductSetResponse", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/productSets/*}/products" + "(google.api.http).get": "/v1/{name=projects/*/locations/*/productSets/*}/products", + "(google.api.method_signature)": "name" } }, "ImportProductSets": { @@ -1097,7 +1160,10 @@ "responseType": "google.longrunning.Operation", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/productSets:import", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,input_config", + "(google.longrunning.operation_info).response_type": "ImportProductSetsResponse", + "(google.longrunning.operation_info).metadata_type": "BatchOperationMetadata" } }, "PurgeProducts": { @@ -1105,12 +1171,19 @@ "responseType": "google.longrunning.Operation", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/products:purge", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "BatchOperationMetadata" } } } }, "Product": { + "options": { + "(google.api.resource).type": "vision.googleapis.com/Product", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/products/{product}" + }, "fields": { "name": { "type": "string", @@ -1126,7 +1199,10 @@ }, "productCategory": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "productLabels": { "rule": "repeated", @@ -1150,6 +1226,10 @@ } }, "ProductSet": { + "options": { + "(google.api.resource).type": "vision.googleapis.com/ProductSet", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/productSets/{product_set}" + }, "fields": { "name": { "type": "string", @@ -1161,15 +1241,25 @@ }, "indexTime": { "type": "google.protobuf.Timestamp", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "indexError": { "type": "google.rpc.Status", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, "ReferenceImage": { + "options": { + "(google.api.resource).type": "vision.googleapis.com/ReferenceImage", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }, "fields": { "name": { "type": "string", @@ -1177,12 +1267,18 @@ }, "uri": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "boundingPolys": { "rule": "repeated", "type": "BoundingPoly", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1190,11 +1286,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "product": { "type": "Product", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "productId": { "type": "string", @@ -1206,7 +1309,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "pageSize": { "type": "int32", @@ -1235,7 +1342,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/Product" + } } } }, @@ -1243,7 +1354,10 @@ "fields": { "product": { "type": "Product", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1255,7 +1369,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/Product" + } } } }, @@ -1263,11 +1381,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "productSet": { "type": "ProductSet", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "productSetId": { "type": "string", @@ -1279,7 +1404,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "pageSize": { "type": "int32", @@ -1308,7 +1437,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ProductSet" + } } } }, @@ -1316,7 +1449,10 @@ "fields": { "productSet": { "type": "ProductSet", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1328,7 +1464,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ProductSet" + } } } }, @@ -1336,11 +1476,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/Product" + } }, "referenceImage": { "type": "ReferenceImage", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "referenceImageId": { "type": "string", @@ -1352,7 +1499,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/Product" + } }, "pageSize": { "type": "int32", @@ -1385,7 +1536,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ReferenceImage" + } } } }, @@ -1393,7 +1548,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ReferenceImage" + } } } }, @@ -1401,11 +1560,19 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ProductSet" + } }, "product": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/Product" + } } } }, @@ -1413,11 +1580,19 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ProductSet" + } }, "product": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/Product" + } } } }, @@ -1425,7 +1600,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "vision.googleapis.com/ProductSet" + } }, "pageSize": { "type": "int32", @@ -1477,11 +1656,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "inputConfig": { "type": "ImportProductSetsInputConfig", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1554,7 +1740,11 @@ }, "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "force": { "type": "bool", @@ -7126,7 +7316,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ClientProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -7234,6 +7424,74 @@ "type": "string", "id": 1050, "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } } } }, diff --git a/src/v1/doc/google/cloud/vision/v1/doc_image_annotator.js b/src/v1/doc/google/cloud/vision/v1/doc_image_annotator.js index 2ce23c0b..a5a3ea5a 100644 --- a/src/v1/doc/google/cloud/vision/v1/doc_image_annotator.js +++ b/src/v1/doc/google/cloud/vision/v1/doc_image_annotator.js @@ -646,6 +646,30 @@ const LocalizedObjectAnnotation = { * * The number should be among the values of [Likelihood]{@link google.cloud.vision.v1.Likelihood} * + * @property {number} adultConfidence + * Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means + * very confident. + * + * @property {number} spoofConfidence + * Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means + * very confident. + * + * @property {number} medicalConfidence + * Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means + * very confident. + * + * @property {number} violenceConfidence + * Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means + * very confident. + * + * @property {number} racyConfidence + * Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very + * confident. + * + * @property {number} nsfwConfidence + * Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very + * confident. + * * @typedef SafeSearchAnnotation * @memberof google.cloud.vision.v1 * @see [google.cloud.vision.v1.SafeSearchAnnotation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/vision/v1/image_annotator.proto} @@ -979,43 +1003,11 @@ const AnnotateImageResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; -/** - * Response to a single file annotation request. A file may contain one or more - * images, which individually have their own responses. - * - * @property {Object} inputConfig - * Information about the file for which this response is generated. - * - * This object should have the same structure as [InputConfig]{@link google.cloud.vision.v1.InputConfig} - * - * @property {Object[]} responses - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * This object should have the same structure as [AnnotateImageResponse]{@link google.cloud.vision.v1.AnnotateImageResponse} - * - * @property {number} totalPages - * This field gives the total number of pages in the file. - * - * @property {Object} error - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @typedef AnnotateFileResponse - * @memberof google.cloud.vision.v1 - * @see [google.cloud.vision.v1.AnnotateFileResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/vision/v1/image_annotator.proto} - */ -const AnnotateFileResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - /** * Multiple image annotation requests are batched into a single service call. * * @property {Object[]} requests - * Individual image annotation requests for this batch. + * Required. Individual image annotation requests for this batch. * * This object should have the same structure as [AnnotateImageRequest]{@link google.cloud.vision.v1.AnnotateImageRequest} * @@ -1099,11 +1091,43 @@ const AnnotateFileRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * Response to a single file annotation request. A file may contain one or more + * images, which individually have their own responses. + * + * @property {Object} inputConfig + * Information about the file for which this response is generated. + * + * This object should have the same structure as [InputConfig]{@link google.cloud.vision.v1.InputConfig} + * + * @property {Object[]} responses + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * This object should have the same structure as [AnnotateImageResponse]{@link google.cloud.vision.v1.AnnotateImageResponse} + * + * @property {number} totalPages + * This field gives the total number of pages in the file. + * + * @property {Object} error + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * + * @typedef AnnotateFileResponse + * @memberof google.cloud.vision.v1 + * @see [google.cloud.vision.v1.AnnotateFileResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/vision/v1/image_annotator.proto} + */ +const AnnotateFileResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * A list of requests to annotate files using the BatchAnnotateFiles API. * * @property {Object[]} requests - * The list of file annotation requests. Right now we support only one + * Required. The list of file annotation requests. Right now we support only one * AnnotateFileRequest in BatchAnnotateFilesRequest. * * This object should have the same structure as [AnnotateFileRequest]{@link google.cloud.vision.v1.AnnotateFileRequest} @@ -1198,7 +1222,7 @@ const AsyncAnnotateFileResponse = { * Request for async image annotation for a list of images. * * @property {Object[]} requests - * Individual image annotation requests for this batch. + * Required. Individual image annotation requests for this batch. * * This object should have the same structure as [AnnotateImageRequest]{@link google.cloud.vision.v1.AnnotateImageRequest} * @@ -1250,7 +1274,7 @@ const AsyncBatchAnnotateImagesResponse = { * call. * * @property {Object[]} requests - * Individual async file annotation requests for this batch. + * Required. Individual async file annotation requests for this batch. * * This object should have the same structure as [AsyncAnnotateFileRequest]{@link google.cloud.vision.v1.AsyncAnnotateFileRequest} * diff --git a/src/v1/doc/google/cloud/vision/v1/doc_product_search.js b/src/v1/doc/google/cloud/vision/v1/doc_product_search.js index a20c5d39..fb828555 100644 --- a/src/v1/doc/google/cloud/vision/v1/doc_product_search.js +++ b/src/v1/doc/google/cloud/vision/v1/doc_product_search.js @@ -25,8 +25,7 @@ * This object should have the same structure as [BoundingPoly]{@link google.cloud.vision.v1.BoundingPoly} * * @property {string} productSet - * The resource name of a ProductSet to - * be searched for similar images. + * The resource name of a ProductSet to be searched for similar images. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. diff --git a/src/v1/doc/google/cloud/vision/v1/doc_product_search_service.js b/src/v1/doc/google/cloud/vision/v1/doc_product_search_service.js index dd4c9fef..d469fc6d 100644 --- a/src/v1/doc/google/cloud/vision/v1/doc_product_search_service.js +++ b/src/v1/doc/google/cloud/vision/v1/doc_product_search_service.js @@ -35,13 +35,11 @@ * characters long. * * @property {string} productCategory - * The category for the product identified by the reference image. This should + * Immutable. The category for the product identified by the reference image. This should * be either "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. * - * This field is immutable. - * * @property {Object[]} productLabels * Key-value pairs that can be attached to a product. At query time, * constraints can be specified based on the product_labels. @@ -143,15 +141,13 @@ const ProductSet = { * This field is ignored when creating a reference image. * * @property {string} uri - * The Google Cloud Storage URI of the reference image. + * Required. The Google Cloud Storage URI of the reference image. * * The URI must start with `gs://`. * - * Required. - * * @property {Object[]} boundingPolys - * Bounding polygons around the areas of interest in the reference image. - * Optional. If this field is empty, the system will try to detect regions of + * 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 @@ -173,13 +169,13 @@ const ReferenceImage = { * Request message for the `CreateProduct` method. * * @property {string} parent - * The project in which the Product should be created. + * Required. The project in which the Product should be created. * * Format is * `projects/PROJECT_ID/locations/LOC_ID`. * * @property {Object} product - * The product to create. + * Required. The product to create. * * This object should have the same structure as [Product]{@link google.cloud.vision.v1.Product} * @@ -201,7 +197,7 @@ const CreateProductRequest = { * Request message for the `ListProducts` method. * * @property {string} parent - * The project OR ProductSet from which Products should be listed. + * Required. The project OR ProductSet from which Products should be listed. * * Format: * `projects/PROJECT_ID/locations/LOC_ID` @@ -244,7 +240,7 @@ const ListProductsResponse = { * Request message for the `GetProduct` method. * * @property {string} name - * Resource name of the Product to get. + * Required. Resource name of the Product to get. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` @@ -261,7 +257,7 @@ const GetProductRequest = { * Request message for the `UpdateProduct` method. * * @property {Object} product - * The Product resource which replaces the one on the server. + * Required. The Product resource which replaces the one on the server. * product.name is immutable. * * This object should have the same structure as [Product]{@link google.cloud.vision.v1.Product} @@ -287,7 +283,7 @@ const UpdateProductRequest = { * Request message for the `DeleteProduct` method. * * @property {string} name - * Resource name of product to delete. + * Required. Resource name of product to delete. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` @@ -304,12 +300,12 @@ const DeleteProductRequest = { * Request message for the `CreateProductSet` method. * * @property {string} parent - * The project in which the ProductSet should be created. + * Required. The project in which the ProductSet should be created. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * * @property {Object} productSet - * The ProductSet to create. + * Required. The ProductSet to create. * * This object should have the same structure as [ProductSet]{@link google.cloud.vision.v1.ProductSet} * @@ -331,7 +327,7 @@ const CreateProductSetRequest = { * Request message for the `ListProductSets` method. * * @property {string} parent - * The project from which ProductSets should be listed. + * Required. The project from which ProductSets should be listed. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * @@ -373,7 +369,7 @@ const ListProductSetsResponse = { * Request message for the `GetProductSet` method. * * @property {string} name - * Resource name of the ProductSet to get. + * Required. Resource name of the ProductSet to get. * * Format is: * `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` @@ -390,7 +386,7 @@ const GetProductSetRequest = { * Request message for the `UpdateProductSet` method. * * @property {Object} productSet - * The ProductSet resource which replaces the one on the server. + * Required. The ProductSet resource which replaces the one on the server. * * This object should have the same structure as [ProductSet]{@link google.cloud.vision.v1.ProductSet} * @@ -414,7 +410,7 @@ const UpdateProductSetRequest = { * Request message for the `DeleteProductSet` method. * * @property {string} name - * Resource name of the ProductSet to delete. + * Required. Resource name of the ProductSet to delete. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` @@ -431,13 +427,13 @@ const DeleteProductSetRequest = { * Request message for the `CreateReferenceImage` method. * * @property {string} parent - * Resource name of the product in which to create the reference image. + * Required. Resource name of the product in which to create the reference image. * * Format is * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. * * @property {Object} referenceImage - * The reference image to create. + * Required. The reference image to create. * If an image ID is specified, it is ignored. * * This object should have the same structure as [ReferenceImage]{@link google.cloud.vision.v1.ReferenceImage} @@ -460,7 +456,7 @@ const CreateReferenceImageRequest = { * Request message for the `ListReferenceImages` method. * * @property {string} parent - * Resource name of the product containing the reference images. + * Required. Resource name of the product containing the reference images. * * Format is * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. @@ -508,7 +504,7 @@ const ListReferenceImagesResponse = { * Request message for the `GetReferenceImage` method. * * @property {string} name - * The resource name of the ReferenceImage to get. + * Required. The resource name of the ReferenceImage to get. * * Format is: * @@ -526,7 +522,7 @@ const GetReferenceImageRequest = { * Request message for the `DeleteReferenceImage` method. * * @property {string} name - * The resource name of the reference image to delete. + * Required. The resource name of the reference image to delete. * * Format is: * @@ -544,13 +540,13 @@ const DeleteReferenceImageRequest = { * Request message for the `AddProductToProductSet` method. * * @property {string} name - * The resource name for the ProductSet to modify. + * Required. The resource name for the ProductSet to modify. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` * * @property {string} product - * The resource name for the Product to be added to this 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` @@ -567,13 +563,13 @@ const AddProductToProductSetRequest = { * Request message for the `RemoveProductFromProductSet` method. * * @property {string} name - * The resource name for the ProductSet to modify. + * Required. The resource name for the ProductSet to modify. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` * * @property {string} product - * The resource name for the Product to be removed from this 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` @@ -590,7 +586,7 @@ const RemoveProductFromProductSetRequest = { * Request message for the `ListProductsInProductSet` method. * * @property {string} name - * The ProductSet resource for which to retrieve Products. + * Required. The ProductSet resource for which to retrieve Products. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` @@ -659,17 +655,15 @@ const ListProductsInProductSetResponse = { * `product-display-name` column refers to * display_name, the * `product-category` column refers to - * product_category, and - * the `labels` column refers to - * product_labels. + * product_category, and the + * `labels` column refers to 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 field - * for the product to a space (" "). You can update the `display_name` later - * by using the API. + * sets the 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` @@ -727,12 +721,12 @@ const ImportProductSetsInputConfig = { * Request message for the `ImportProductSets` method. * * @property {string} parent - * The project in which the ProductSets should be imported. + * Required. The project in which the ProductSets should be imported. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * * @property {Object} inputConfig - * The input content for the list of requests. + * Required. The input content for the list of requests. * * This object should have the same structure as [ImportProductSetsInputConfig]{@link google.cloud.vision.v1.ImportProductSetsInputConfig} * @@ -748,10 +742,8 @@ const ImportProductSetsRequest = { * Response message for the `ImportProductSets` method. * * This message is returned by the - * google.longrunning.Operations.GetOperation - * method in the returned - * google.longrunning.Operation.response - * field. + * google.longrunning.Operations.GetOperation method in the returned + * google.longrunning.Operation.response field. * * @property {Object[]} referenceImages * The list of reference_images that are imported successfully. @@ -794,8 +786,7 @@ const ImportProductSetsResponse = { * * @property {Object} endTime * The time when the batch request is finished and - * google.longrunning.Operation.done is - * set to true. + * google.longrunning.Operation.done is set to true. * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * @@ -873,7 +864,7 @@ const ProductSetPurgeConfig = { * ProductSet will be deleted. * * @property {string} parent - * The project and location in which the Products should be deleted. + * Required. The project and location in which the Products should be deleted. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * diff --git a/src/v1/doc/google/cloud/vision/v1/doc_text_annotation.js b/src/v1/doc/google/cloud/vision/v1/doc_text_annotation.js index dea61108..e60d857e 100644 --- a/src/v1/doc/google/cloud/vision/v1/doc_text_annotation.js +++ b/src/v1/doc/google/cloud/vision/v1/doc_text_annotation.js @@ -21,9 +21,8 @@ * 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 - * message definition below for more detail. + * to the TextAnnotation.TextProperty message definition below for more + * detail. * * @property {Object[]} pages * List of pages detected by OCR. diff --git a/src/v1/image_annotator_client.js b/src/v1/image_annotator_client.js index 084f13a1..296d7066 100644 --- a/src/v1/image_annotator_client.js +++ b/src/v1/image_annotator_client.js @@ -268,7 +268,7 @@ class ImageAnnotatorClient { * @param {Object} request * The request object that will be sent. * @param {Object[]} request.requests - * Individual image annotation requests for this batch. + * Required. Individual image annotation requests for this batch. * * This object should have the same structure as [AnnotateImageRequest]{@link google.cloud.vision.v1.AnnotateImageRequest} * @param {string} [request.parent] @@ -343,7 +343,7 @@ class ImageAnnotatorClient { * @param {Object} request * The request object that will be sent. * @param {Object[]} request.requests - * The list of file annotation requests. Right now we support only one + * Required. The list of file annotation requests. Right now we support only one * AnnotateFileRequest in BatchAnnotateFilesRequest. * * This object should have the same structure as [AnnotateFileRequest]{@link google.cloud.vision.v1.AnnotateFileRequest} @@ -421,7 +421,7 @@ class ImageAnnotatorClient { * @param {Object} request * The request object that will be sent. * @param {Object[]} request.requests - * Individual image annotation requests for this batch. + * Required. Individual image annotation requests for this batch. * * This object should have the same structure as [AnnotateImageRequest]{@link google.cloud.vision.v1.AnnotateImageRequest} * @param {Object} request.outputConfig @@ -562,7 +562,7 @@ class ImageAnnotatorClient { * @param {Object} request * The request object that will be sent. * @param {Object[]} request.requests - * Individual async file annotation requests for this batch. + * Required. Individual async file annotation requests for this batch. * * This object should have the same structure as [AsyncAnnotateFileRequest]{@link google.cloud.vision.v1.AsyncAnnotateFileRequest} * @param {string} [request.parent] diff --git a/src/v1/product_search_client.js b/src/v1/product_search_client.js index 527a87a5..20f9915c 100644 --- a/src/v1/product_search_client.js +++ b/src/v1/product_search_client.js @@ -24,18 +24,16 @@ const VERSION = require('../../package.json').version; * 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 - * resources, named `projects/* /locations/* /productSets/*`, which acts as a way - * to put different products into groups to limit identification. + * - The API has a collection of 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 - * resources, named + * - The API has a collection of Product resources, named * `projects/* /locations/* /products/*` * - * - Each Product has a collection of - * ReferenceImage resources, named + * - Each Product has a collection of ReferenceImage resources, named * `projects/* /locations/* /products/* /referenceImages/*` * * @class @@ -338,11 +336,11 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which the ProductSet should be created. + * Required. The project in which the ProductSet should be created. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * @param {Object} request.productSet - * The ProductSet to create. + * Required. The ProductSet to create. * * This object should have the same structure as [ProductSet]{@link google.cloud.vision.v1.ProductSet} * @param {string} [request.productSetId] @@ -413,7 +411,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project from which ProductSets should be listed. + * Required. The project from which ProductSets should be listed. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * @param {number} [request.pageSize] @@ -527,7 +525,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project from which ProductSets should be listed. + * Required. The project from which ProductSets should be listed. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * @param {number} [request.pageSize] @@ -578,7 +576,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the ProductSet to get. + * Required. Resource name of the ProductSet to get. * * Format is: * `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` @@ -642,7 +640,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.productSet - * The ProductSet resource which replaces the one on the server. + * Required. The ProductSet resource which replaces the one on the server. * * This object should have the same structure as [ProductSet]{@link google.cloud.vision.v1.ProductSet} * @param {Object} [request.updateMask] @@ -708,7 +706,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the ProductSet to delete. + * Required. Resource name of the ProductSet to delete. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` @@ -764,12 +762,12 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which the Product should be created. + * Required. The project in which the Product should be created. * * Format is * `projects/PROJECT_ID/locations/LOC_ID`. * @param {Object} request.product - * The product to create. + * Required. The product to create. * * This object should have the same structure as [Product]{@link google.cloud.vision.v1.Product} * @param {string} [request.productId] @@ -839,7 +837,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project OR ProductSet from which Products should be listed. + * Required. The project OR ProductSet from which Products should be listed. * * Format: * `projects/PROJECT_ID/locations/LOC_ID` @@ -954,7 +952,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project OR ProductSet from which Products should be listed. + * Required. The project OR ProductSet from which Products should be listed. * * Format: * `projects/PROJECT_ID/locations/LOC_ID` @@ -1006,7 +1004,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the Product to get. + * Required. Resource name of the Product to get. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` @@ -1077,7 +1075,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.product - * The Product resource which replaces the one on the server. + * Required. The Product resource which replaces the one on the server. * product.name is immutable. * * This object should have the same structure as [Product]{@link google.cloud.vision.v1.Product} @@ -1146,7 +1144,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of product to delete. + * Required. Resource name of product to delete. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` @@ -1213,12 +1211,12 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the product in which to create the reference image. + * 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 {Object} request.referenceImage - * The reference image to create. + * Required. The reference image to create. * If an image ID is specified, it is ignored. * * This object should have the same structure as [ReferenceImage]{@link google.cloud.vision.v1.ReferenceImage} @@ -1291,7 +1289,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The resource name of the reference image to delete. + * Required. The resource name of the reference image to delete. * * Format is: * @@ -1347,7 +1345,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the product containing the reference images. + * Required. Resource name of the product containing the reference images. * * Format is * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. @@ -1462,7 +1460,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the product containing the reference images. + * Required. Resource name of the product containing the reference images. * * Format is * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. @@ -1514,7 +1512,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The resource name of the ReferenceImage to get. + * Required. The resource name of the ReferenceImage to get. * * Format is: * @@ -1579,12 +1577,12 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The resource name for the ProductSet to modify. + * Required. The resource name for the ProductSet to modify. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` * @param {string} request.product - * The resource name for the Product to be added to this 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` @@ -1642,12 +1640,12 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The resource name for the ProductSet to modify. + * Required. The resource name for the ProductSet to modify. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` * @param {string} request.product - * The resource name for the Product to be removed from this 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` @@ -1711,7 +1709,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The ProductSet resource for which to retrieve Products. + * Required. The ProductSet resource for which to retrieve Products. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` @@ -1830,7 +1828,7 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The ProductSet resource for which to retrieve Products. + * Required. The ProductSet resource for which to retrieve Products. * * Format is: * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` @@ -1876,8 +1874,8 @@ class ProductSearchClient { * Asynchronous API that imports a list of reference images to specified * product sets based on a list of image information. * - * The google.longrunning.Operation API can be - * used to keep track of the progress and results of the request. + * The 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) * @@ -1888,11 +1886,11 @@ class ProductSearchClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which the ProductSets should be imported. + * Required. The project in which the ProductSets should be imported. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * @param {Object} request.inputConfig - * The input content for the list of requests. + * Required. The input content for the list of requests. * * This object should have the same structure as [ImportProductSetsInputConfig]{@link google.cloud.vision.v1.ImportProductSetsInputConfig} * @param {Object} [options] @@ -2023,14 +2021,14 @@ class ProductSearchClient { * ProductSet, you must wait until the PurgeProducts operation has finished * for that ProductSet. * - * The google.longrunning.Operation API can be - * used to keep track of the progress and results of the request. + * The google.longrunning.Operation API can be used to keep track of the + * progress and results of the request. * `Operation.metadata` contains `BatchOperationMetadata`. (progress) * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project and location in which the Products should be deleted. + * Required. The project and location in which the Products should be deleted. * * Format is `projects/PROJECT_ID/locations/LOC_ID`. * @param {Object} [request.productSetPurgeConfig] diff --git a/synth.metadata b/synth.metadata index 2b20c7b8..984250d9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-13T11:29:41.331321Z", + "updateTime": "2019-09-14T11:29:38.380853Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dc88acb2ced136067d3ed2356b6a87ca7f017a96", - "internalRef": "268735517" + "sha": "6b2ba2ae3124c22ecb56af7102c78110b8576671", + "internalRef": "268974829" } }, {