vision: v1p3beta1 publish annotations and retry config

PiperOrigin-RevId: 292605599
This commit is contained in:
Google APIs 2020-01-31 13:30:12 -08:00 committed by Copybara-Service
parent 78f61482cd
commit ffdfa4f55a
6 changed files with 409 additions and 82 deletions

View File

@ -21,6 +21,9 @@ proto_library(
],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"//google/type:color_proto",
@ -171,6 +174,9 @@ moved_proto_library(
srcs = [":vision_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"//google/type:color_proto",

View File

@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// 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.
@ -11,12 +11,15 @@
// WITHOUT 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";
@ -37,13 +40,18 @@ option java_package = "com.google.cloud.vision.v1p3beta1";
// 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) {
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
@ -58,6 +66,11 @@ service ImageAnnotator {
post: "/v1p3beta1/files:asyncBatchAnnotate"
body: "*"
};
option (google.api.method_signature) = "requests";
option (google.longrunning.operation_info) = {
response_type: "AsyncBatchAnnotateFilesResponse"
metadata_type: "OperationMetadata"
};
}
}
@ -684,8 +697,8 @@ message AsyncAnnotateFileResponse {
// 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];
}
// Response to an async batch file annotation request.

View File

@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// 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.
@ -11,12 +11,14 @@
// WITHOUT 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/resource.proto";
import "google/cloud/vision/v1p3beta1/geometry.proto";
import "google/cloud/vision/v1p3beta1/product_search_service.proto";
import "google/protobuf/timestamp.proto";
@ -64,7 +66,9 @@ message ProductSearchParams {
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
string product_set = 6;
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" or "apparel" should be

View File

@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// 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.
@ -11,12 +11,16 @@
// WITHOUT 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";
@ -33,22 +37,23 @@ 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
// - 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
// - 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
// - 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:
@ -60,6 +65,7 @@ service ProductSearch {
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.
@ -68,11 +74,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: "/v1p3beta1/{parent=projects/*/locations/*}/productSets"
};
option (google.api.method_signature) = "parent";
}
// Gets information associated with a ProductSet.
@ -84,6 +90,7 @@ service ProductSearch {
option (google.api.http) = {
get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}"
};
option (google.api.method_signature) = "name";
}
// Makes changes to a ProductSet resource.
@ -99,6 +106,7 @@ service ProductSearch {
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
@ -114,6 +122,7 @@ service ProductSearch {
option (google.api.http) = {
delete: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}"
};
option (google.api.method_signature) = "name";
}
// Creates and returns a new product resource.
@ -129,6 +138,7 @@ service ProductSearch {
post: "/v1p3beta1/{parent=projects/*/locations/*}/products"
body: "product"
};
option (google.api.method_signature) = "parent,product,product_id";
}
// Lists products in an unspecified order.
@ -140,6 +150,7 @@ service ProductSearch {
option (google.api.http) = {
get: "/v1p3beta1/{parent=projects/*/locations/*}/products"
};
option (google.api.method_signature) = "parent";
}
// Gets information associated with a Product.
@ -151,6 +162,7 @@ service ProductSearch {
option (google.api.http) = {
get: "/v1p3beta1/{name=projects/*/locations/*/products/*}"
};
option (google.api.method_signature) = "name";
}
// Makes changes to a Product resource.
@ -172,6 +184,7 @@ service ProductSearch {
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.
@ -187,6 +200,7 @@ service ProductSearch {
option (google.api.http) = {
delete: "/v1p3beta1/{name=projects/*/locations/*/products/*}"
};
option (google.api.method_signature) = "name";
}
// Creates and returns a new ReferenceImage resource.
@ -214,6 +228,7 @@ service ProductSearch {
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.
@ -232,6 +247,7 @@ service ProductSearch {
option (google.api.http) = {
delete: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}"
};
option (google.api.method_signature) = "name";
}
// Lists reference images.
@ -246,6 +262,7 @@ service ProductSearch {
option (google.api.http) = {
get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages"
};
option (google.api.method_signature) = "parent";
}
// Gets information associated with a ReferenceImage.
@ -257,6 +274,7 @@ service ProductSearch {
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
@ -273,6 +291,7 @@ service ProductSearch {
post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct"
body: "*"
};
option (google.api.method_signature) = "name,product";
}
// Removes a Product from the specified ProductSet.
@ -286,6 +305,7 @@ service ProductSearch {
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
@ -300,6 +320,7 @@ service ProductSearch {
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
@ -319,11 +340,21 @@ service ProductSearch {
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
@ -351,11 +382,11 @@ message Product {
// characters long.
string description = 3;
// The category for the product identified by the reference image. This should
// be either "homegoods" or "apparel".
//
// This field is immutable.
string product_category = 4;
// 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.
@ -373,6 +404,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:
@ -390,18 +426,23 @@ message ProductSet {
// never been indexed, this field is 0.
//
// 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:
@ -411,34 +452,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
@ -449,11 +493,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;
@ -474,45 +523,60 @@ 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.
// If update_mask isn't specified, all mutable fields are to be updated.
// Valid mask paths include `product_labels`, `display_name` and
// Valid mask paths include `product_labels`, `display_name`, and
// `description`.
google.protobuf.FieldMask update_mask = 2;
}
// 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
@ -523,10 +587,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;
@ -547,17 +616,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;
// `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 {
// 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.
@ -568,24 +642,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;
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "vision.googleapis.com/Product"
}
];
// The reference image to create.
// 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
@ -596,11 +680,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;
@ -626,61 +715,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;
@ -704,7 +828,7 @@ message ListProductsInProductSetResponse {
message ImportProductSetsGcsSource {
// The Google Cloud Storage URI of the input csv file.
//
// The URI must start with gs://
// 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.
@ -774,13 +898,18 @@ 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;
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The input content for the list of requests.
ImportProductSetsInputConfig input_config = 2;
// Required. The input content for the list of requests.
ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED];
}
// Response message for the `ImportProductSets` method.

View File

@ -0,0 +1,136 @@
{
"methodConfig": [
{
"name": [
{
"service": "google.cloud.vision.v1p3beta1.ImageAnnotator",
"method": "AsyncBatchAnnotateFiles"
}
],
"timeout": "600s",
"retryPolicy": {
"initialBackoff": "0.100s",
"maxBackoff": "60s",
"backoffMultiplier": 1.3,
"retryableStatusCodes": [
]
}
},
{
"name": [
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "CreateProductSet"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "UpdateProductSet"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "CreateProduct"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "UpdateProduct"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "CreateReferenceImage"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "AddProductToProductSet"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "RemoveProductFromProductSet"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "ImportProductSets"
}
],
"timeout": "600s",
"retryPolicy": {
"initialBackoff": "0.100s",
"maxBackoff": "60s",
"backoffMultiplier": 1.3,
"retryableStatusCodes": [
]
}
},
{
"name": [
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "ListProductSets"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "GetProductSet"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "DeleteProductSet"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "ListProducts"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "GetProduct"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "DeleteProduct"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "DeleteReferenceImage"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "ListReferenceImages"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "GetReferenceImage"
},
{
"service": "google.cloud.vision.v1p3beta1.ProductSearch",
"method": "ListProductsInProductSet"
}
],
"timeout": "600s",
"retryPolicy": {
"initialBackoff": "0.100s",
"maxBackoff": "60s",
"backoffMultiplier": 1.3,
"retryableStatusCodes": [
"UNAVAILABLE",
"DEADLINE_EXCEEDED"
]
}
},
{
"name": [
{
"service": "google.cloud.vision.v1p3beta1.ImageAnnotator",
"method": "BatchAnnotateImages"
}
],
"timeout": "600s",
"retryPolicy": {
"initialBackoff": "0.100s",
"maxBackoff": "60s",
"backoffMultiplier": 1.3,
"retryableStatusCodes": [
"UNAVAILABLE",
"DEADLINE_EXCEEDED"
]
}
}
]
}

View File

@ -0,0 +1,39 @@
type: google.api.Service
config_version: 3
name: vision.googleapis.com
title: Cloud Vision API
apis:
- name: google.cloud.vision.v1p3beta1.ImageAnnotator
- name: google.cloud.vision.v1p3beta1.ProductSearch
types:
- name: google.cloud.vision.v1p3beta1.AnnotateFileResponse
- name: google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
- name: google.cloud.vision.v1p3beta1.BatchOperationMetadata
- name: google.cloud.vision.v1p3beta1.ImportProductSetsResponse
- name: google.cloud.vision.v1p3beta1.OperationMetadata
documentation:
summary: |-
Integrates Google Vision features, including image labeling, face, logo,
and landmark detection, optical character recognition (OCR), and detection
of explicit content, into applications.
authentication:
rules:
- selector: 'google.cloud.vision.v1p3beta1.ImageAnnotator.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/cloud-vision
- selector: 'google.cloud.vision.v1p3beta1.ProductSearch.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/cloud-vision
- selector: 'google.longrunning.Operations.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/cloud-vision