Constants
ImageAnnotator_BatchAnnotateImages_FullMethodName, ImageAnnotator_BatchAnnotateFiles_FullMethodName, ImageAnnotator_AsyncBatchAnnotateImages_FullMethodName, ImageAnnotator_AsyncBatchAnnotateFiles_FullMethodName
const (
ImageAnnotator_BatchAnnotateImages_FullMethodName = "/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages"
ImageAnnotator_BatchAnnotateFiles_FullMethodName = "/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles"
ImageAnnotator_AsyncBatchAnnotateImages_FullMethodName = "/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages"
ImageAnnotator_AsyncBatchAnnotateFiles_FullMethodName = "/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles"
)ProductSearch_CreateProductSet_FullMethodName, ProductSearch_ListProductSets_FullMethodName, ProductSearch_GetProductSet_FullMethodName, ProductSearch_UpdateProductSet_FullMethodName, ProductSearch_DeleteProductSet_FullMethodName, ProductSearch_CreateProduct_FullMethodName, ProductSearch_ListProducts_FullMethodName, ProductSearch_GetProduct_FullMethodName, ProductSearch_UpdateProduct_FullMethodName, ProductSearch_DeleteProduct_FullMethodName, ProductSearch_CreateReferenceImage_FullMethodName, ProductSearch_DeleteReferenceImage_FullMethodName, ProductSearch_ListReferenceImages_FullMethodName, ProductSearch_GetReferenceImage_FullMethodName, ProductSearch_AddProductToProductSet_FullMethodName, ProductSearch_RemoveProductFromProductSet_FullMethodName, ProductSearch_ListProductsInProductSet_FullMethodName, ProductSearch_ImportProductSets_FullMethodName, ProductSearch_PurgeProducts_FullMethodName
const (
ProductSearch_CreateProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/CreateProductSet"
ProductSearch_ListProductSets_FullMethodName = "/google.cloud.vision.v1.ProductSearch/ListProductSets"
ProductSearch_GetProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/GetProductSet"
ProductSearch_UpdateProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/UpdateProductSet"
ProductSearch_DeleteProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/DeleteProductSet"
ProductSearch_CreateProduct_FullMethodName = "/google.cloud.vision.v1.ProductSearch/CreateProduct"
ProductSearch_ListProducts_FullMethodName = "/google.cloud.vision.v1.ProductSearch/ListProducts"
ProductSearch_GetProduct_FullMethodName = "/google.cloud.vision.v1.ProductSearch/GetProduct"
ProductSearch_UpdateProduct_FullMethodName = "/google.cloud.vision.v1.ProductSearch/UpdateProduct"
ProductSearch_DeleteProduct_FullMethodName = "/google.cloud.vision.v1.ProductSearch/DeleteProduct"
ProductSearch_CreateReferenceImage_FullMethodName = "/google.cloud.vision.v1.ProductSearch/CreateReferenceImage"
ProductSearch_DeleteReferenceImage_FullMethodName = "/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage"
ProductSearch_ListReferenceImages_FullMethodName = "/google.cloud.vision.v1.ProductSearch/ListReferenceImages"
ProductSearch_GetReferenceImage_FullMethodName = "/google.cloud.vision.v1.ProductSearch/GetReferenceImage"
ProductSearch_AddProductToProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/AddProductToProductSet"
ProductSearch_RemoveProductFromProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet"
ProductSearch_ListProductsInProductSet_FullMethodName = "/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet"
ProductSearch_ImportProductSets_FullMethodName = "/google.cloud.vision.v1.ProductSearch/ImportProductSets"
ProductSearch_PurgeProducts_FullMethodName = "/google.cloud.vision.v1.ProductSearch/PurgeProducts"
)Variables
Likelihood_name, Likelihood_value
var (
Likelihood_name = map[int32]string{
0: "UNKNOWN",
1: "VERY_UNLIKELY",
2: "UNLIKELY",
3: "POSSIBLE",
4: "LIKELY",
5: "VERY_LIKELY",
}
Likelihood_value = map[string]int32{
"UNKNOWN": 0,
"VERY_UNLIKELY": 1,
"UNLIKELY": 2,
"POSSIBLE": 3,
"LIKELY": 4,
"VERY_LIKELY": 5,
}
)Enum value maps for Likelihood.
Feature_Type_name, Feature_Type_value
var (
Feature_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "FACE_DETECTION",
2: "LANDMARK_DETECTION",
3: "LOGO_DETECTION",
4: "LABEL_DETECTION",
5: "TEXT_DETECTION",
11: "DOCUMENT_TEXT_DETECTION",
6: "SAFE_SEARCH_DETECTION",
7: "IMAGE_PROPERTIES",
9: "CROP_HINTS",
10: "WEB_DETECTION",
12: "PRODUCT_SEARCH",
19: "OBJECT_LOCALIZATION",
}
Feature_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"FACE_DETECTION": 1,
"LANDMARK_DETECTION": 2,
"LOGO_DETECTION": 3,
"LABEL_DETECTION": 4,
"TEXT_DETECTION": 5,
"DOCUMENT_TEXT_DETECTION": 11,
"SAFE_SEARCH_DETECTION": 6,
"IMAGE_PROPERTIES": 7,
"CROP_HINTS": 9,
"WEB_DETECTION": 10,
"PRODUCT_SEARCH": 12,
"OBJECT_LOCALIZATION": 19,
}
)Enum value maps for Feature_Type.
FaceAnnotation_Landmark_Type_name, FaceAnnotation_Landmark_Type_value
var (
FaceAnnotation_Landmark_Type_name = map[int32]string{
0: "UNKNOWN_LANDMARK",
1: "LEFT_EYE",
2: "RIGHT_EYE",
3: "LEFT_OF_LEFT_EYEBROW",
4: "RIGHT_OF_LEFT_EYEBROW",
5: "LEFT_OF_RIGHT_EYEBROW",
6: "RIGHT_OF_RIGHT_EYEBROW",
7: "MIDPOINT_BETWEEN_EYES",
8: "NOSE_TIP",
9: "UPPER_LIP",
10: "LOWER_LIP",
11: "MOUTH_LEFT",
12: "MOUTH_RIGHT",
13: "MOUTH_CENTER",
14: "NOSE_BOTTOM_RIGHT",
15: "NOSE_BOTTOM_LEFT",
16: "NOSE_BOTTOM_CENTER",
17: "LEFT_EYE_TOP_BOUNDARY",
18: "LEFT_EYE_RIGHT_CORNER",
19: "LEFT_EYE_BOTTOM_BOUNDARY",
20: "LEFT_EYE_LEFT_CORNER",
21: "RIGHT_EYE_TOP_BOUNDARY",
22: "RIGHT_EYE_RIGHT_CORNER",
23: "RIGHT_EYE_BOTTOM_BOUNDARY",
24: "RIGHT_EYE_LEFT_CORNER",
25: "LEFT_EYEBROW_UPPER_MIDPOINT",
26: "RIGHT_EYEBROW_UPPER_MIDPOINT",
27: "LEFT_EAR_TRAGION",
28: "RIGHT_EAR_TRAGION",
29: "LEFT_EYE_PUPIL",
30: "RIGHT_EYE_PUPIL",
31: "FOREHEAD_GLABELLA",
32: "CHIN_GNATHION",
33: "CHIN_LEFT_GONION",
34: "CHIN_RIGHT_GONION",
35: "LEFT_CHEEK_CENTER",
36: "RIGHT_CHEEK_CENTER",
}
FaceAnnotation_Landmark_Type_value = map[string]int32{
"UNKNOWN_LANDMARK": 0,
"LEFT_EYE": 1,
"RIGHT_EYE": 2,
"LEFT_OF_LEFT_EYEBROW": 3,
"RIGHT_OF_LEFT_EYEBROW": 4,
"LEFT_OF_RIGHT_EYEBROW": 5,
"RIGHT_OF_RIGHT_EYEBROW": 6,
"MIDPOINT_BETWEEN_EYES": 7,
"NOSE_TIP": 8,
"UPPER_LIP": 9,
"LOWER_LIP": 10,
"MOUTH_LEFT": 11,
"MOUTH_RIGHT": 12,
"MOUTH_CENTER": 13,
"NOSE_BOTTOM_RIGHT": 14,
"NOSE_BOTTOM_LEFT": 15,
"NOSE_BOTTOM_CENTER": 16,
"LEFT_EYE_TOP_BOUNDARY": 17,
"LEFT_EYE_RIGHT_CORNER": 18,
"LEFT_EYE_BOTTOM_BOUNDARY": 19,
"LEFT_EYE_LEFT_CORNER": 20,
"RIGHT_EYE_TOP_BOUNDARY": 21,
"RIGHT_EYE_RIGHT_CORNER": 22,
"RIGHT_EYE_BOTTOM_BOUNDARY": 23,
"RIGHT_EYE_LEFT_CORNER": 24,
"LEFT_EYEBROW_UPPER_MIDPOINT": 25,
"RIGHT_EYEBROW_UPPER_MIDPOINT": 26,
"LEFT_EAR_TRAGION": 27,
"RIGHT_EAR_TRAGION": 28,
"LEFT_EYE_PUPIL": 29,
"RIGHT_EYE_PUPIL": 30,
"FOREHEAD_GLABELLA": 31,
"CHIN_GNATHION": 32,
"CHIN_LEFT_GONION": 33,
"CHIN_RIGHT_GONION": 34,
"LEFT_CHEEK_CENTER": 35,
"RIGHT_CHEEK_CENTER": 36,
}
)Enum value maps for FaceAnnotation_Landmark_Type.
OperationMetadata_State_name, OperationMetadata_State_value
var (
OperationMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "CREATED",
2: "RUNNING",
3: "DONE",
4: "CANCELLED",
}
OperationMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"CREATED": 1,
"RUNNING": 2,
"DONE": 3,
"CANCELLED": 4,
}
)Enum value maps for OperationMetadata_State.
BatchOperationMetadata_State_name, BatchOperationMetadata_State_value
var (
BatchOperationMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "PROCESSING",
2: "SUCCESSFUL",
3: "FAILED",
4: "CANCELLED",
}
BatchOperationMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"PROCESSING": 1,
"SUCCESSFUL": 2,
"FAILED": 3,
"CANCELLED": 4,
}
)Enum value maps for BatchOperationMetadata_State.
TextAnnotation_DetectedBreak_BreakType_name, TextAnnotation_DetectedBreak_BreakType_value
var (
TextAnnotation_DetectedBreak_BreakType_name = map[int32]string{
0: "UNKNOWN",
1: "SPACE",
2: "SURE_SPACE",
3: "EOL_SURE_SPACE",
4: "HYPHEN",
5: "LINE_BREAK",
}
TextAnnotation_DetectedBreak_BreakType_value = map[string]int32{
"UNKNOWN": 0,
"SPACE": 1,
"SURE_SPACE": 2,
"EOL_SURE_SPACE": 3,
"HYPHEN": 4,
"LINE_BREAK": 5,
}
)Enum value maps for TextAnnotation_DetectedBreak_BreakType.
Block_BlockType_name, Block_BlockType_value
var (
Block_BlockType_name = map[int32]string{
0: "UNKNOWN",
1: "TEXT",
2: "TABLE",
3: "PICTURE",
4: "RULER",
5: "BARCODE",
}
Block_BlockType_value = map[string]int32{
"UNKNOWN": 0,
"TEXT": 1,
"TABLE": 2,
"PICTURE": 3,
"RULER": 4,
"BARCODE": 5,
}
)Enum value maps for Block_BlockType.
File_google_cloud_vision_v1_geometry_proto
var File_google_cloud_vision_v1_geometry_proto protoreflect.FileDescriptorFile_google_cloud_vision_v1_image_annotator_proto
var File_google_cloud_vision_v1_image_annotator_proto protoreflect.FileDescriptorFile_google_cloud_vision_v1_product_search_proto
var File_google_cloud_vision_v1_product_search_proto protoreflect.FileDescriptorFile_google_cloud_vision_v1_product_search_service_proto
var File_google_cloud_vision_v1_product_search_service_proto protoreflect.FileDescriptorFile_google_cloud_vision_v1_text_annotation_proto
var File_google_cloud_vision_v1_text_annotation_proto protoreflect.FileDescriptorFile_google_cloud_vision_v1_web_detection_proto
var File_google_cloud_vision_v1_web_detection_proto protoreflect.FileDescriptorImageAnnotator_ServiceDesc
var ImageAnnotator_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.vision.v1.ImageAnnotator",
HandlerType: (*ImageAnnotatorServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "BatchAnnotateImages",
Handler: _ImageAnnotator_BatchAnnotateImages_Handler,
},
{
MethodName: "BatchAnnotateFiles",
Handler: _ImageAnnotator_BatchAnnotateFiles_Handler,
},
{
MethodName: "AsyncBatchAnnotateImages",
Handler: _ImageAnnotator_AsyncBatchAnnotateImages_Handler,
},
{
MethodName: "AsyncBatchAnnotateFiles",
Handler: _ImageAnnotator_AsyncBatchAnnotateFiles_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/vision/v1/image_annotator.proto",
}ImageAnnotator_ServiceDesc is the grpc.ServiceDesc for ImageAnnotator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
ProductSearch_ServiceDesc
var ProductSearch_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.vision.v1.ProductSearch",
HandlerType: (*ProductSearchServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateProductSet",
Handler: _ProductSearch_CreateProductSet_Handler,
},
{
MethodName: "ListProductSets",
Handler: _ProductSearch_ListProductSets_Handler,
},
{
MethodName: "GetProductSet",
Handler: _ProductSearch_GetProductSet_Handler,
},
{
MethodName: "UpdateProductSet",
Handler: _ProductSearch_UpdateProductSet_Handler,
},
{
MethodName: "DeleteProductSet",
Handler: _ProductSearch_DeleteProductSet_Handler,
},
{
MethodName: "CreateProduct",
Handler: _ProductSearch_CreateProduct_Handler,
},
{
MethodName: "ListProducts",
Handler: _ProductSearch_ListProducts_Handler,
},
{
MethodName: "GetProduct",
Handler: _ProductSearch_GetProduct_Handler,
},
{
MethodName: "UpdateProduct",
Handler: _ProductSearch_UpdateProduct_Handler,
},
{
MethodName: "DeleteProduct",
Handler: _ProductSearch_DeleteProduct_Handler,
},
{
MethodName: "CreateReferenceImage",
Handler: _ProductSearch_CreateReferenceImage_Handler,
},
{
MethodName: "DeleteReferenceImage",
Handler: _ProductSearch_DeleteReferenceImage_Handler,
},
{
MethodName: "ListReferenceImages",
Handler: _ProductSearch_ListReferenceImages_Handler,
},
{
MethodName: "GetReferenceImage",
Handler: _ProductSearch_GetReferenceImage_Handler,
},
{
MethodName: "AddProductToProductSet",
Handler: _ProductSearch_AddProductToProductSet_Handler,
},
{
MethodName: "RemoveProductFromProductSet",
Handler: _ProductSearch_RemoveProductFromProductSet_Handler,
},
{
MethodName: "ListProductsInProductSet",
Handler: _ProductSearch_ListProductsInProductSet_Handler,
},
{
MethodName: "ImportProductSets",
Handler: _ProductSearch_ImportProductSets_Handler,
},
{
MethodName: "PurgeProducts",
Handler: _ProductSearch_PurgeProducts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/vision/v1/product_search_service.proto",
}ProductSearch_ServiceDesc is the grpc.ServiceDesc for ProductSearch service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions
func RegisterImageAnnotatorServer
func RegisterImageAnnotatorServer(s grpc.ServiceRegistrar, srv ImageAnnotatorServer)func RegisterProductSearchServer
func RegisterProductSearchServer(s grpc.ServiceRegistrar, srv ProductSearchServer)AddProductToProductSetRequest
type AddProductToProductSetRequest struct {
// Required. The resource name for the ProductSet to modify.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The resource name for the Product to be added to this ProductSet.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
Product string `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"`
// contains filtered or unexported fields
}Request message for the AddProductToProductSet method.
func (*AddProductToProductSetRequest) Descriptor
func (*AddProductToProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use AddProductToProductSetRequest.ProtoReflect.Descriptor instead.
func (*AddProductToProductSetRequest) GetName
func (x *AddProductToProductSetRequest) GetName() stringfunc (*AddProductToProductSetRequest) GetProduct
func (x *AddProductToProductSetRequest) GetProduct() stringfunc (*AddProductToProductSetRequest) ProtoMessage
func (*AddProductToProductSetRequest) ProtoMessage()func (*AddProductToProductSetRequest) ProtoReflect
func (x *AddProductToProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*AddProductToProductSetRequest) Reset
func (x *AddProductToProductSetRequest) Reset()func (*AddProductToProductSetRequest) String
func (x *AddProductToProductSetRequest) String() stringAnnotateFileRequest
type AnnotateFileRequest struct {
// Required. Information about the input file.
InputConfig *InputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"`
// Required. Requested features.
Features []*Feature `protobuf:"bytes,2,rep,name=features,proto3" json:"features,omitempty"`
// Additional context that may accompany the image(s) in the file.
ImageContext *ImageContext `protobuf:"bytes,3,opt,name=image_context,json=imageContext,proto3" json:"image_context,omitempty"`
// Pages of the file to perform image annotation.
//
// Pages starts from 1, we assume the first page of the file is page 1.
// At most 5 pages are supported per request. Pages can be negative.
//
// Page 1 means the first page.
// Page 2 means the second page.
// Page -1 means the last page.
// Page -2 means the second to the last page.
//
// If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
//
// If this field is empty, by default the service performs image annotation
// for the first 5 pages of the file.
Pages []int32 `protobuf:"varint,4,rep,packed,name=pages,proto3" json:"pages,omitempty"`
// contains filtered or unexported fields
}A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
func (*AnnotateFileRequest) Descriptor
func (*AnnotateFileRequest) Descriptor() ([]byte, []int)Deprecated: Use AnnotateFileRequest.ProtoReflect.Descriptor instead.
func (*AnnotateFileRequest) GetFeatures
func (x *AnnotateFileRequest) GetFeatures() []*Featurefunc (*AnnotateFileRequest) GetImageContext
func (x *AnnotateFileRequest) GetImageContext() *ImageContextfunc (*AnnotateFileRequest) GetInputConfig
func (x *AnnotateFileRequest) GetInputConfig() *InputConfigfunc (*AnnotateFileRequest) GetPages
func (x *AnnotateFileRequest) GetPages() []int32func (*AnnotateFileRequest) ProtoMessage
func (*AnnotateFileRequest) ProtoMessage()func (*AnnotateFileRequest) ProtoReflect
func (x *AnnotateFileRequest) ProtoReflect() protoreflect.Messagefunc (*AnnotateFileRequest) Reset
func (x *AnnotateFileRequest) Reset()func (*AnnotateFileRequest) String
func (x *AnnotateFileRequest) String() stringAnnotateFileResponse
type AnnotateFileResponse struct {
// Information about the file for which this response is generated.
InputConfig *InputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"`
// Individual responses to images found within the file. This field will be
// empty if the `error` field is set.
Responses []*AnnotateImageResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"`
// This field gives the total number of pages in the file.
TotalPages int32 `protobuf:"varint,3,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
// If set, represents the error message for the failed request. The
// `responses` field will not be set in this case.
Error *status.Status `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.
func (*AnnotateFileResponse) Descriptor
func (*AnnotateFileResponse) Descriptor() ([]byte, []int)Deprecated: Use AnnotateFileResponse.ProtoReflect.Descriptor instead.
func (*AnnotateFileResponse) GetError
func (x *AnnotateFileResponse) GetError() *status.Statusfunc (*AnnotateFileResponse) GetInputConfig
func (x *AnnotateFileResponse) GetInputConfig() *InputConfigfunc (*AnnotateFileResponse) GetResponses
func (x *AnnotateFileResponse) GetResponses() []*AnnotateImageResponsefunc (*AnnotateFileResponse) GetTotalPages
func (x *AnnotateFileResponse) GetTotalPages() int32func (*AnnotateFileResponse) ProtoMessage
func (*AnnotateFileResponse) ProtoMessage()func (*AnnotateFileResponse) ProtoReflect
func (x *AnnotateFileResponse) ProtoReflect() protoreflect.Messagefunc (*AnnotateFileResponse) Reset
func (x *AnnotateFileResponse) Reset()func (*AnnotateFileResponse) String
func (x *AnnotateFileResponse) String() stringAnnotateImageRequest
type AnnotateImageRequest struct {
// The image to be processed.
Image *Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
// Requested features.
Features []*Feature `protobuf:"bytes,2,rep,name=features,proto3" json:"features,omitempty"`
// Additional context that may accompany the image.
ImageContext *ImageContext `protobuf:"bytes,3,opt,name=image_context,json=imageContext,proto3" json:"image_context,omitempty"`
// contains filtered or unexported fields
}Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.
func (*AnnotateImageRequest) Descriptor
func (*AnnotateImageRequest) Descriptor() ([]byte, []int)Deprecated: Use AnnotateImageRequest.ProtoReflect.Descriptor instead.
func (*AnnotateImageRequest) GetFeatures
func (x *AnnotateImageRequest) GetFeatures() []*Featurefunc (*AnnotateImageRequest) GetImage
func (x *AnnotateImageRequest) GetImage() *Imagefunc (*AnnotateImageRequest) GetImageContext
func (x *AnnotateImageRequest) GetImageContext() *ImageContextfunc (*AnnotateImageRequest) ProtoMessage
func (*AnnotateImageRequest) ProtoMessage()func (*AnnotateImageRequest) ProtoReflect
func (x *AnnotateImageRequest) ProtoReflect() protoreflect.Messagefunc (*AnnotateImageRequest) Reset
func (x *AnnotateImageRequest) Reset()func (*AnnotateImageRequest) String
func (x *AnnotateImageRequest) String() stringAnnotateImageResponse
type AnnotateImageResponse struct {
// If present, face detection has completed successfully.
FaceAnnotations []*FaceAnnotation `protobuf:"bytes,1,rep,name=face_annotations,json=faceAnnotations,proto3" json:"face_annotations,omitempty"`
// If present, landmark detection has completed successfully.
LandmarkAnnotations []*EntityAnnotation `protobuf:"bytes,2,rep,name=landmark_annotations,json=landmarkAnnotations,proto3" json:"landmark_annotations,omitempty"`
// If present, logo detection has completed successfully.
LogoAnnotations []*EntityAnnotation `protobuf:"bytes,3,rep,name=logo_annotations,json=logoAnnotations,proto3" json:"logo_annotations,omitempty"`
// If present, label detection has completed successfully.
LabelAnnotations []*EntityAnnotation `protobuf:"bytes,4,rep,name=label_annotations,json=labelAnnotations,proto3" json:"label_annotations,omitempty"`
// If present, localized object detection has completed successfully.
// This will be sorted descending by confidence score.
LocalizedObjectAnnotations []*LocalizedObjectAnnotation `protobuf:"bytes,22,rep,name=localized_object_annotations,json=localizedObjectAnnotations,proto3" json:"localized_object_annotations,omitempty"`
// If present, text (OCR) detection has completed successfully.
TextAnnotations []*EntityAnnotation `protobuf:"bytes,5,rep,name=text_annotations,json=textAnnotations,proto3" json:"text_annotations,omitempty"`
// If present, text (OCR) detection or document (OCR) text detection has
// completed successfully.
// This annotation provides the structural hierarchy for the OCR detected
// text.
FullTextAnnotation *TextAnnotation `protobuf:"bytes,12,opt,name=full_text_annotation,json=fullTextAnnotation,proto3" json:"full_text_annotation,omitempty"`
// If present, safe-search annotation has completed successfully.
SafeSearchAnnotation *SafeSearchAnnotation `protobuf:"bytes,6,opt,name=safe_search_annotation,json=safeSearchAnnotation,proto3" json:"safe_search_annotation,omitempty"`
// If present, image properties were extracted successfully.
ImagePropertiesAnnotation *ImageProperties `protobuf:"bytes,8,opt,name=image_properties_annotation,json=imagePropertiesAnnotation,proto3" json:"image_properties_annotation,omitempty"`
// If present, crop hints have completed successfully.
CropHintsAnnotation *CropHintsAnnotation `protobuf:"bytes,11,opt,name=crop_hints_annotation,json=cropHintsAnnotation,proto3" json:"crop_hints_annotation,omitempty"`
// If present, web detection has completed successfully.
WebDetection *WebDetection `protobuf:"bytes,13,opt,name=web_detection,json=webDetection,proto3" json:"web_detection,omitempty"`
// If present, product search has completed successfully.
ProductSearchResults *ProductSearchResults `protobuf:"bytes,14,opt,name=product_search_results,json=productSearchResults,proto3" json:"product_search_results,omitempty"`
// If set, represents the error message for the operation.
// Note that filled-in image annotations are guaranteed to be
// correct, even when `error` is set.
Error *status.Status `protobuf:"bytes,9,opt,name=error,proto3" json:"error,omitempty"`
// If present, contextual information is needed to understand where this image
// comes from.
Context *ImageAnnotationContext `protobuf:"bytes,21,opt,name=context,proto3" json:"context,omitempty"`
// contains filtered or unexported fields
}Response to an image annotation request.
func (*AnnotateImageResponse) Descriptor
func (*AnnotateImageResponse) Descriptor() ([]byte, []int)Deprecated: Use AnnotateImageResponse.ProtoReflect.Descriptor instead.
func (*AnnotateImageResponse) GetContext
func (x *AnnotateImageResponse) GetContext() *ImageAnnotationContextfunc (*AnnotateImageResponse) GetCropHintsAnnotation
func (x *AnnotateImageResponse) GetCropHintsAnnotation() *CropHintsAnnotationfunc (*AnnotateImageResponse) GetError
func (x *AnnotateImageResponse) GetError() *status.Statusfunc (*AnnotateImageResponse) GetFaceAnnotations
func (x *AnnotateImageResponse) GetFaceAnnotations() []*FaceAnnotationfunc (*AnnotateImageResponse) GetFullTextAnnotation
func (x *AnnotateImageResponse) GetFullTextAnnotation() *TextAnnotationfunc (*AnnotateImageResponse) GetImagePropertiesAnnotation
func (x *AnnotateImageResponse) GetImagePropertiesAnnotation() *ImagePropertiesfunc (*AnnotateImageResponse) GetLabelAnnotations
func (x *AnnotateImageResponse) GetLabelAnnotations() []*EntityAnnotationfunc (*AnnotateImageResponse) GetLandmarkAnnotations
func (x *AnnotateImageResponse) GetLandmarkAnnotations() []*EntityAnnotationfunc (*AnnotateImageResponse) GetLocalizedObjectAnnotations
func (x *AnnotateImageResponse) GetLocalizedObjectAnnotations() []*LocalizedObjectAnnotationfunc (*AnnotateImageResponse) GetLogoAnnotations
func (x *AnnotateImageResponse) GetLogoAnnotations() []*EntityAnnotationfunc (*AnnotateImageResponse) GetProductSearchResults
func (x *AnnotateImageResponse) GetProductSearchResults() *ProductSearchResultsfunc (*AnnotateImageResponse) GetSafeSearchAnnotation
func (x *AnnotateImageResponse) GetSafeSearchAnnotation() *SafeSearchAnnotationfunc (*AnnotateImageResponse) GetTextAnnotations
func (x *AnnotateImageResponse) GetTextAnnotations() []*EntityAnnotationfunc (*AnnotateImageResponse) GetWebDetection
func (x *AnnotateImageResponse) GetWebDetection() *WebDetectionfunc (*AnnotateImageResponse) ProtoMessage
func (*AnnotateImageResponse) ProtoMessage()func (*AnnotateImageResponse) ProtoReflect
func (x *AnnotateImageResponse) ProtoReflect() protoreflect.Messagefunc (*AnnotateImageResponse) Reset
func (x *AnnotateImageResponse) Reset()func (*AnnotateImageResponse) String
func (x *AnnotateImageResponse) String() stringAsyncAnnotateFileRequest
type AsyncAnnotateFileRequest struct {
// Required. Information about the input file.
InputConfig *InputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"`
// Required. Requested features.
Features []*Feature `protobuf:"bytes,2,rep,name=features,proto3" json:"features,omitempty"`
// Additional context that may accompany the image(s) in the file.
ImageContext *ImageContext `protobuf:"bytes,3,opt,name=image_context,json=imageContext,proto3" json:"image_context,omitempty"`
// Required. The desired output location and metadata (e.g. format).
OutputConfig *OutputConfig `protobuf:"bytes,4,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// contains filtered or unexported fields
}An offline file annotation request.
func (*AsyncAnnotateFileRequest) Descriptor
func (*AsyncAnnotateFileRequest) Descriptor() ([]byte, []int)Deprecated: Use AsyncAnnotateFileRequest.ProtoReflect.Descriptor instead.
func (*AsyncAnnotateFileRequest) GetFeatures
func (x *AsyncAnnotateFileRequest) GetFeatures() []*Featurefunc (*AsyncAnnotateFileRequest) GetImageContext
func (x *AsyncAnnotateFileRequest) GetImageContext() *ImageContextfunc (*AsyncAnnotateFileRequest) GetInputConfig
func (x *AsyncAnnotateFileRequest) GetInputConfig() *InputConfigfunc (*AsyncAnnotateFileRequest) GetOutputConfig
func (x *AsyncAnnotateFileRequest) GetOutputConfig() *OutputConfigfunc (*AsyncAnnotateFileRequest) ProtoMessage
func (*AsyncAnnotateFileRequest) ProtoMessage()func (*AsyncAnnotateFileRequest) ProtoReflect
func (x *AsyncAnnotateFileRequest) ProtoReflect() protoreflect.Messagefunc (*AsyncAnnotateFileRequest) Reset
func (x *AsyncAnnotateFileRequest) Reset()func (*AsyncAnnotateFileRequest) String
func (x *AsyncAnnotateFileRequest) String() stringAsyncAnnotateFileResponse
type AsyncAnnotateFileResponse struct {
// The output location and metadata from AsyncAnnotateFileRequest.
OutputConfig *OutputConfig `protobuf:"bytes,1,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// contains filtered or unexported fields
}The response for a single offline file annotation request.
func (*AsyncAnnotateFileResponse) Descriptor
func (*AsyncAnnotateFileResponse) Descriptor() ([]byte, []int)Deprecated: Use AsyncAnnotateFileResponse.ProtoReflect.Descriptor instead.
func (*AsyncAnnotateFileResponse) GetOutputConfig
func (x *AsyncAnnotateFileResponse) GetOutputConfig() *OutputConfigfunc (*AsyncAnnotateFileResponse) ProtoMessage
func (*AsyncAnnotateFileResponse) ProtoMessage()func (*AsyncAnnotateFileResponse) ProtoReflect
func (x *AsyncAnnotateFileResponse) ProtoReflect() protoreflect.Messagefunc (*AsyncAnnotateFileResponse) Reset
func (x *AsyncAnnotateFileResponse) Reset()func (*AsyncAnnotateFileResponse) String
func (x *AsyncAnnotateFileResponse) String() stringAsyncBatchAnnotateFilesRequest
type AsyncBatchAnnotateFilesRequest struct {
// Required. Individual async file annotation requests for this batch.
Requests []*AsyncAnnotateFileRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
// Optional. Target project and location to make a call.
//
// Format: `projects/{project-id}/locations/{location-id}`.
//
// If no parent is specified, a region will be chosen automatically.
//
// Supported location-ids:
//
// `us`: USA country only,
// `asia`: East asia areas, like Japan, Taiwan,
// `eu`: The European Union.
//
// Example: `projects/project-A/locations/eu`.
Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The labels with user-defined metadata for the request.
//
// Label keys and values can be no longer than 63 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// Label values are optional. Label keys must start with a letter.
Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}Multiple async file annotation requests are batched into a single service call.
func (*AsyncBatchAnnotateFilesRequest) Descriptor
func (*AsyncBatchAnnotateFilesRequest) Descriptor() ([]byte, []int)Deprecated: Use AsyncBatchAnnotateFilesRequest.ProtoReflect.Descriptor instead.
func (*AsyncBatchAnnotateFilesRequest) GetLabels
func (x *AsyncBatchAnnotateFilesRequest) GetLabels() map[string]stringfunc (*AsyncBatchAnnotateFilesRequest) GetParent
func (x *AsyncBatchAnnotateFilesRequest) GetParent() stringfunc (*AsyncBatchAnnotateFilesRequest) GetRequests
func (x *AsyncBatchAnnotateFilesRequest) GetRequests() []*AsyncAnnotateFileRequestfunc (*AsyncBatchAnnotateFilesRequest) ProtoMessage
func (*AsyncBatchAnnotateFilesRequest) ProtoMessage()func (*AsyncBatchAnnotateFilesRequest) ProtoReflect
func (x *AsyncBatchAnnotateFilesRequest) ProtoReflect() protoreflect.Messagefunc (*AsyncBatchAnnotateFilesRequest) Reset
func (x *AsyncBatchAnnotateFilesRequest) Reset()func (*AsyncBatchAnnotateFilesRequest) String
func (x *AsyncBatchAnnotateFilesRequest) String() stringAsyncBatchAnnotateFilesResponse
type AsyncBatchAnnotateFilesResponse struct {
// The list of file annotation responses, one for each request in
// AsyncBatchAnnotateFilesRequest.
Responses []*AsyncAnnotateFileResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
// contains filtered or unexported fields
}Response to an async batch file annotation request.
func (*AsyncBatchAnnotateFilesResponse) Descriptor
func (*AsyncBatchAnnotateFilesResponse) Descriptor() ([]byte, []int)Deprecated: Use AsyncBatchAnnotateFilesResponse.ProtoReflect.Descriptor instead.
func (*AsyncBatchAnnotateFilesResponse) GetResponses
func (x *AsyncBatchAnnotateFilesResponse) GetResponses() []*AsyncAnnotateFileResponsefunc (*AsyncBatchAnnotateFilesResponse) ProtoMessage
func (*AsyncBatchAnnotateFilesResponse) ProtoMessage()func (*AsyncBatchAnnotateFilesResponse) ProtoReflect
func (x *AsyncBatchAnnotateFilesResponse) ProtoReflect() protoreflect.Messagefunc (*AsyncBatchAnnotateFilesResponse) Reset
func (x *AsyncBatchAnnotateFilesResponse) Reset()func (*AsyncBatchAnnotateFilesResponse) String
func (x *AsyncBatchAnnotateFilesResponse) String() stringAsyncBatchAnnotateImagesRequest
type AsyncBatchAnnotateImagesRequest struct {
// Required. Individual image annotation requests for this batch.
Requests []*AnnotateImageRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
// Required. The desired output location and metadata (e.g. format).
OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// Optional. Target project and location to make a call.
//
// Format: `projects/{project-id}/locations/{location-id}`.
//
// If no parent is specified, a region will be chosen automatically.
//
// Supported location-ids:
//
// `us`: USA country only,
// `asia`: East asia areas, like Japan, Taiwan,
// `eu`: The European Union.
//
// Example: `projects/project-A/locations/eu`.
Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The labels with user-defined metadata for the request.
//
// Label keys and values can be no longer than 63 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// Label values are optional. Label keys must start with a letter.
Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}Request for async image annotation for a list of images.
func (*AsyncBatchAnnotateImagesRequest) Descriptor
func (*AsyncBatchAnnotateImagesRequest) Descriptor() ([]byte, []int)Deprecated: Use AsyncBatchAnnotateImagesRequest.ProtoReflect.Descriptor instead.
func (*AsyncBatchAnnotateImagesRequest) GetLabels
func (x *AsyncBatchAnnotateImagesRequest) GetLabels() map[string]stringfunc (*AsyncBatchAnnotateImagesRequest) GetOutputConfig
func (x *AsyncBatchAnnotateImagesRequest) GetOutputConfig() *OutputConfigfunc (*AsyncBatchAnnotateImagesRequest) GetParent
func (x *AsyncBatchAnnotateImagesRequest) GetParent() stringfunc (*AsyncBatchAnnotateImagesRequest) GetRequests
func (x *AsyncBatchAnnotateImagesRequest) GetRequests() []*AnnotateImageRequestfunc (*AsyncBatchAnnotateImagesRequest) ProtoMessage
func (*AsyncBatchAnnotateImagesRequest) ProtoMessage()func (*AsyncBatchAnnotateImagesRequest) ProtoReflect
func (x *AsyncBatchAnnotateImagesRequest) ProtoReflect() protoreflect.Messagefunc (*AsyncBatchAnnotateImagesRequest) Reset
func (x *AsyncBatchAnnotateImagesRequest) Reset()func (*AsyncBatchAnnotateImagesRequest) String
func (x *AsyncBatchAnnotateImagesRequest) String() stringAsyncBatchAnnotateImagesResponse
type AsyncBatchAnnotateImagesResponse struct {
// The output location and metadata from AsyncBatchAnnotateImagesRequest.
OutputConfig *OutputConfig `protobuf:"bytes,1,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// contains filtered or unexported fields
}Response to an async batch image annotation request.
func (*AsyncBatchAnnotateImagesResponse) Descriptor
func (*AsyncBatchAnnotateImagesResponse) Descriptor() ([]byte, []int)Deprecated: Use AsyncBatchAnnotateImagesResponse.ProtoReflect.Descriptor instead.
func (*AsyncBatchAnnotateImagesResponse) GetOutputConfig
func (x *AsyncBatchAnnotateImagesResponse) GetOutputConfig() *OutputConfigfunc (*AsyncBatchAnnotateImagesResponse) ProtoMessage
func (*AsyncBatchAnnotateImagesResponse) ProtoMessage()func (*AsyncBatchAnnotateImagesResponse) ProtoReflect
func (x *AsyncBatchAnnotateImagesResponse) ProtoReflect() protoreflect.Messagefunc (*AsyncBatchAnnotateImagesResponse) Reset
func (x *AsyncBatchAnnotateImagesResponse) Reset()func (*AsyncBatchAnnotateImagesResponse) String
func (x *AsyncBatchAnnotateImagesResponse) String() stringBatchAnnotateFilesRequest
type BatchAnnotateFilesRequest struct {
// Required. The list of file annotation requests. Right now we support only
// one AnnotateFileRequest in BatchAnnotateFilesRequest.
Requests []*AnnotateFileRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
// Optional. Target project and location to make a call.
//
// Format: `projects/{project-id}/locations/{location-id}`.
//
// If no parent is specified, a region will be chosen automatically.
//
// Supported location-ids:
//
// `us`: USA country only,
// `asia`: East asia areas, like Japan, Taiwan,
// `eu`: The European Union.
//
// Example: `projects/project-A/locations/eu`.
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The labels with user-defined metadata for the request.
//
// Label keys and values can be no longer than 63 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// Label values are optional. Label keys must start with a letter.
Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}A list of requests to annotate files using the BatchAnnotateFiles API.
func (*BatchAnnotateFilesRequest) Descriptor
func (*BatchAnnotateFilesRequest) Descriptor() ([]byte, []int)Deprecated: Use BatchAnnotateFilesRequest.ProtoReflect.Descriptor instead.
func (*BatchAnnotateFilesRequest) GetLabels
func (x *BatchAnnotateFilesRequest) GetLabels() map[string]stringfunc (*BatchAnnotateFilesRequest) GetParent
func (x *BatchAnnotateFilesRequest) GetParent() stringfunc (*BatchAnnotateFilesRequest) GetRequests
func (x *BatchAnnotateFilesRequest) GetRequests() []*AnnotateFileRequestfunc (*BatchAnnotateFilesRequest) ProtoMessage
func (*BatchAnnotateFilesRequest) ProtoMessage()func (*BatchAnnotateFilesRequest) ProtoReflect
func (x *BatchAnnotateFilesRequest) ProtoReflect() protoreflect.Messagefunc (*BatchAnnotateFilesRequest) Reset
func (x *BatchAnnotateFilesRequest) Reset()func (*BatchAnnotateFilesRequest) String
func (x *BatchAnnotateFilesRequest) String() stringBatchAnnotateFilesResponse
type BatchAnnotateFilesResponse struct {
// The list of file annotation responses, each response corresponding to each
// AnnotateFileRequest in BatchAnnotateFilesRequest.
Responses []*AnnotateFileResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
// contains filtered or unexported fields
}A list of file annotation responses.
func (*BatchAnnotateFilesResponse) Descriptor
func (*BatchAnnotateFilesResponse) Descriptor() ([]byte, []int)Deprecated: Use BatchAnnotateFilesResponse.ProtoReflect.Descriptor instead.
func (*BatchAnnotateFilesResponse) GetResponses
func (x *BatchAnnotateFilesResponse) GetResponses() []*AnnotateFileResponsefunc (*BatchAnnotateFilesResponse) ProtoMessage
func (*BatchAnnotateFilesResponse) ProtoMessage()func (*BatchAnnotateFilesResponse) ProtoReflect
func (x *BatchAnnotateFilesResponse) ProtoReflect() protoreflect.Messagefunc (*BatchAnnotateFilesResponse) Reset
func (x *BatchAnnotateFilesResponse) Reset()func (*BatchAnnotateFilesResponse) String
func (x *BatchAnnotateFilesResponse) String() stringBatchAnnotateImagesRequest
type BatchAnnotateImagesRequest struct {
// Required. Individual image annotation requests for this batch.
Requests []*AnnotateImageRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
// Optional. Target project and location to make a call.
//
// Format: `projects/{project-id}/locations/{location-id}`.
//
// If no parent is specified, a region will be chosen automatically.
//
// Supported location-ids:
//
// `us`: USA country only,
// `asia`: East asia areas, like Japan, Taiwan,
// `eu`: The European Union.
//
// Example: `projects/project-A/locations/eu`.
Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The labels with user-defined metadata for the request.
//
// Label keys and values can be no longer than 63 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// Label values are optional. Label keys must start with a letter.
Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}Multiple image annotation requests are batched into a single service call.
func (*BatchAnnotateImagesRequest) Descriptor
func (*BatchAnnotateImagesRequest) Descriptor() ([]byte, []int)Deprecated: Use BatchAnnotateImagesRequest.ProtoReflect.Descriptor instead.
func (*BatchAnnotateImagesRequest) GetLabels
func (x *BatchAnnotateImagesRequest) GetLabels() map[string]stringfunc (*BatchAnnotateImagesRequest) GetParent
func (x *BatchAnnotateImagesRequest) GetParent() stringfunc (*BatchAnnotateImagesRequest) GetRequests
func (x *BatchAnnotateImagesRequest) GetRequests() []*AnnotateImageRequestfunc (*BatchAnnotateImagesRequest) ProtoMessage
func (*BatchAnnotateImagesRequest) ProtoMessage()func (*BatchAnnotateImagesRequest) ProtoReflect
func (x *BatchAnnotateImagesRequest) ProtoReflect() protoreflect.Messagefunc (*BatchAnnotateImagesRequest) Reset
func (x *BatchAnnotateImagesRequest) Reset()func (*BatchAnnotateImagesRequest) String
func (x *BatchAnnotateImagesRequest) String() stringBatchAnnotateImagesResponse
type BatchAnnotateImagesResponse struct {
// Individual responses to image annotation requests within the batch.
Responses []*AnnotateImageResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
// contains filtered or unexported fields
}Response to a batch image annotation request.
func (*BatchAnnotateImagesResponse) Descriptor
func (*BatchAnnotateImagesResponse) Descriptor() ([]byte, []int)Deprecated: Use BatchAnnotateImagesResponse.ProtoReflect.Descriptor instead.
func (*BatchAnnotateImagesResponse) GetResponses
func (x *BatchAnnotateImagesResponse) GetResponses() []*AnnotateImageResponsefunc (*BatchAnnotateImagesResponse) ProtoMessage
func (*BatchAnnotateImagesResponse) ProtoMessage()func (*BatchAnnotateImagesResponse) ProtoReflect
func (x *BatchAnnotateImagesResponse) ProtoReflect() protoreflect.Messagefunc (*BatchAnnotateImagesResponse) Reset
func (x *BatchAnnotateImagesResponse) Reset()func (*BatchAnnotateImagesResponse) String
func (x *BatchAnnotateImagesResponse) String() stringBatchOperationMetadata
type BatchOperationMetadata struct {
// The current state of the batch operation.
State BatchOperationMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.vision.v1.BatchOperationMetadata_State" json:"state,omitempty"`
// The time when the batch request was submitted to the server.
SubmitTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
// The time when the batch request is finished and
// [google.longrunning.Operation.done][google.longrunning.Operation.done] is
// set to true.
EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
// contains filtered or unexported fields
}Metadata for the batch operations such as the current state.
This is included in the metadata field of the Operation returned by the
GetOperation call of the google::longrunning::Operations service.
func (*BatchOperationMetadata) Descriptor
func (*BatchOperationMetadata) Descriptor() ([]byte, []int)Deprecated: Use BatchOperationMetadata.ProtoReflect.Descriptor instead.
func (*BatchOperationMetadata) GetEndTime
func (x *BatchOperationMetadata) GetEndTime() *timestamppb.Timestampfunc (*BatchOperationMetadata) GetState
func (x *BatchOperationMetadata) GetState() BatchOperationMetadata_Statefunc (*BatchOperationMetadata) GetSubmitTime
func (x *BatchOperationMetadata) GetSubmitTime() *timestamppb.Timestampfunc (*BatchOperationMetadata) ProtoMessage
func (*BatchOperationMetadata) ProtoMessage()func (*BatchOperationMetadata) ProtoReflect
func (x *BatchOperationMetadata) ProtoReflect() protoreflect.Messagefunc (*BatchOperationMetadata) Reset
func (x *BatchOperationMetadata) Reset()func (*BatchOperationMetadata) String
func (x *BatchOperationMetadata) String() stringBatchOperationMetadata_State
type BatchOperationMetadata_State int32Enumerates the possible states that the batch request can be in.
BatchOperationMetadata_STATE_UNSPECIFIED, BatchOperationMetadata_PROCESSING, BatchOperationMetadata_SUCCESSFUL, BatchOperationMetadata_FAILED, BatchOperationMetadata_CANCELLED
const (
// Invalid.
BatchOperationMetadata_STATE_UNSPECIFIED BatchOperationMetadata_State = 0
// Request is actively being processed.
BatchOperationMetadata_PROCESSING BatchOperationMetadata_State = 1
// The request is done and at least one item has been successfully
// processed.
BatchOperationMetadata_SUCCESSFUL BatchOperationMetadata_State = 2
// The request is done and no item has been successfully processed.
BatchOperationMetadata_FAILED BatchOperationMetadata_State = 3
// The request is done after the longrunning.Operations.CancelOperation has
// been called by the user. Any records that were processed before the
// cancel command are output as specified in the request.
BatchOperationMetadata_CANCELLED BatchOperationMetadata_State = 4
)func (BatchOperationMetadata_State) Descriptor
func (BatchOperationMetadata_State) Descriptor() protoreflect.EnumDescriptorfunc (BatchOperationMetadata_State) Enum
func (x BatchOperationMetadata_State) Enum() *BatchOperationMetadata_Statefunc (BatchOperationMetadata_State) EnumDescriptor
func (BatchOperationMetadata_State) EnumDescriptor() ([]byte, []int)Deprecated: Use BatchOperationMetadata_State.Descriptor instead.
func (BatchOperationMetadata_State) Number
func (x BatchOperationMetadata_State) Number() protoreflect.EnumNumberfunc (BatchOperationMetadata_State) String
func (x BatchOperationMetadata_State) String() stringfunc (BatchOperationMetadata_State) Type
func (BatchOperationMetadata_State) Type() protoreflect.EnumTypeBlock
type Block struct {
// Additional information detected for the block.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The bounding box for the block.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
//
// * when the text is horizontal it might look like:
//
// 0----1
// | |
// 3----2
//
// * when it's rotated 180 degrees around the top-left corner it becomes:
//
// 2----3
// | |
// 1----0
//
// and the vertex order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
// List of paragraphs in this block (if this blocks is of type text).
Paragraphs []*Paragraph `protobuf:"bytes,3,rep,name=paragraphs,proto3" json:"paragraphs,omitempty"`
// Detected block type (text, image etc) for this block.
BlockType Block_BlockType `protobuf:"varint,4,opt,name=block_type,json=blockType,proto3,enum=google.cloud.vision.v1.Block_BlockType" json:"block_type,omitempty"`
// Confidence of the OCR results on the block. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
// contains filtered or unexported fields
}Logical element on the page.
func (*Block) Descriptor
Deprecated: Use Block.ProtoReflect.Descriptor instead.
func (*Block) GetBlockType
func (x *Block) GetBlockType() Block_BlockTypefunc (*Block) GetBoundingBox
func (x *Block) GetBoundingBox() *BoundingPolyfunc (*Block) GetConfidence
func (*Block) GetParagraphs
func (*Block) GetProperty
func (x *Block) GetProperty() *TextAnnotation_TextPropertyfunc (*Block) ProtoMessage
func (*Block) ProtoMessage()func (*Block) ProtoReflect
func (x *Block) ProtoReflect() protoreflect.Messagefunc (*Block) Reset
func (x *Block) Reset()func (*Block) String
Block_BlockType
type Block_BlockType int32Type of a block (text, image etc) as identified by OCR.
Block_UNKNOWN, Block_TEXT, Block_TABLE, Block_PICTURE, Block_RULER, Block_BARCODE
const (
// Unknown block type.
Block_UNKNOWN Block_BlockType = 0
// Regular text block.
Block_TEXT Block_BlockType = 1
// Table block.
Block_TABLE Block_BlockType = 2
// Image block.
Block_PICTURE Block_BlockType = 3
// Horizontal/vertical line box.
Block_RULER Block_BlockType = 4
// Barcode block.
Block_BARCODE Block_BlockType = 5
)func (Block_BlockType) Descriptor
func (Block_BlockType) Descriptor() protoreflect.EnumDescriptorfunc (Block_BlockType) Enum
func (x Block_BlockType) Enum() *Block_BlockTypefunc (Block_BlockType) EnumDescriptor
func (Block_BlockType) EnumDescriptor() ([]byte, []int)Deprecated: Use Block_BlockType.Descriptor instead.
func (Block_BlockType) Number
func (x Block_BlockType) Number() protoreflect.EnumNumberfunc (Block_BlockType) String
func (x Block_BlockType) String() stringfunc (Block_BlockType) Type
func (Block_BlockType) Type() protoreflect.EnumTypeBoundingPoly
type BoundingPoly struct {
// The bounding polygon vertices.
Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"`
// The bounding polygon normalized vertices.
NormalizedVertices []*NormalizedVertex `protobuf:"bytes,2,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"`
// contains filtered or unexported fields
}A bounding polygon for the detected image annotation.
func (*BoundingPoly) Descriptor
func (*BoundingPoly) Descriptor() ([]byte, []int)Deprecated: Use BoundingPoly.ProtoReflect.Descriptor instead.
func (*BoundingPoly) GetNormalizedVertices
func (x *BoundingPoly) GetNormalizedVertices() []*NormalizedVertexfunc (*BoundingPoly) GetVertices
func (x *BoundingPoly) GetVertices() []*Vertexfunc (*BoundingPoly) ProtoMessage
func (*BoundingPoly) ProtoMessage()func (*BoundingPoly) ProtoReflect
func (x *BoundingPoly) ProtoReflect() protoreflect.Messagefunc (*BoundingPoly) Reset
func (x *BoundingPoly) Reset()func (*BoundingPoly) String
func (x *BoundingPoly) String() stringColorInfo
type ColorInfo struct {
// RGB components of the color.
Color *color.Color `protobuf:"bytes,1,opt,name=color,proto3" json:"color,omitempty"`
// Image-specific score for this color. Value in range [0, 1].
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// The fraction of pixels the color occupies in the image.
// Value in range [0, 1].
PixelFraction float32 `protobuf:"fixed32,3,opt,name=pixel_fraction,json=pixelFraction,proto3" json:"pixel_fraction,omitempty"`
// contains filtered or unexported fields
}Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
func (*ColorInfo) Descriptor
Deprecated: Use ColorInfo.ProtoReflect.Descriptor instead.
func (*ColorInfo) GetColor
func (*ColorInfo) GetPixelFraction
func (*ColorInfo) GetScore
func (*ColorInfo) ProtoMessage
func (*ColorInfo) ProtoMessage()func (*ColorInfo) ProtoReflect
func (x *ColorInfo) ProtoReflect() protoreflect.Messagefunc (*ColorInfo) Reset
func (x *ColorInfo) Reset()func (*ColorInfo) String
CreateProductRequest
type CreateProductRequest struct {
// Required. The project in which the Product should be created.
//
// Format is
// `projects/PROJECT_ID/locations/LOC_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The product to create.
Product *Product `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"`
// A user-supplied resource id for this Product. If set, the server will
// attempt to use this value as the resource id. If it is already in use, an
// error is returned with code ALREADY_EXISTS. Must be at most 128 characters
// long. It cannot contain the character `/`.
ProductId string `protobuf:"bytes,3,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
// contains filtered or unexported fields
}Request message for the CreateProduct method.
func (*CreateProductRequest) Descriptor
func (*CreateProductRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateProductRequest.ProtoReflect.Descriptor instead.
func (*CreateProductRequest) GetParent
func (x *CreateProductRequest) GetParent() stringfunc (*CreateProductRequest) GetProduct
func (x *CreateProductRequest) GetProduct() *Productfunc (*CreateProductRequest) GetProductId
func (x *CreateProductRequest) GetProductId() stringfunc (*CreateProductRequest) ProtoMessage
func (*CreateProductRequest) ProtoMessage()func (*CreateProductRequest) ProtoReflect
func (x *CreateProductRequest) ProtoReflect() protoreflect.Messagefunc (*CreateProductRequest) Reset
func (x *CreateProductRequest) Reset()func (*CreateProductRequest) String
func (x *CreateProductRequest) String() stringCreateProductSetRequest
type CreateProductSetRequest struct {
// Required. The project in which the ProductSet should be created.
//
// Format is `projects/PROJECT_ID/locations/LOC_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The ProductSet to create.
ProductSet *ProductSet `protobuf:"bytes,2,opt,name=product_set,json=productSet,proto3" json:"product_set,omitempty"`
// A user-supplied resource id for this ProductSet. If set, the server will
// attempt to use this value as the resource id. If it is already in use, an
// error is returned with code ALREADY_EXISTS. Must be at most 128 characters
// long. It cannot contain the character `/`.
ProductSetId string `protobuf:"bytes,3,opt,name=product_set_id,json=productSetId,proto3" json:"product_set_id,omitempty"`
// contains filtered or unexported fields
}Request message for the CreateProductSet method.
func (*CreateProductSetRequest) Descriptor
func (*CreateProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateProductSetRequest.ProtoReflect.Descriptor instead.
func (*CreateProductSetRequest) GetParent
func (x *CreateProductSetRequest) GetParent() stringfunc (*CreateProductSetRequest) GetProductSet
func (x *CreateProductSetRequest) GetProductSet() *ProductSetfunc (*CreateProductSetRequest) GetProductSetId
func (x *CreateProductSetRequest) GetProductSetId() stringfunc (*CreateProductSetRequest) ProtoMessage
func (*CreateProductSetRequest) ProtoMessage()func (*CreateProductSetRequest) ProtoReflect
func (x *CreateProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*CreateProductSetRequest) Reset
func (x *CreateProductSetRequest) Reset()func (*CreateProductSetRequest) String
func (x *CreateProductSetRequest) String() stringCreateReferenceImageRequest
type CreateReferenceImageRequest struct {
// Required. Resource name of the product in which to create the reference
// image.
//
// Format is
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The reference image to create.
// If an image ID is specified, it is ignored.
ReferenceImage *ReferenceImage `protobuf:"bytes,2,opt,name=reference_image,json=referenceImage,proto3" json:"reference_image,omitempty"`
// A user-supplied resource id for the ReferenceImage to be added. If set,
// the server will attempt to use this value as the resource id. If it is
// already in use, an error is returned with code ALREADY_EXISTS. Must be at
// most 128 characters long. It cannot contain the character `/`.
ReferenceImageId string `protobuf:"bytes,3,opt,name=reference_image_id,json=referenceImageId,proto3" json:"reference_image_id,omitempty"`
// contains filtered or unexported fields
}Request message for the CreateReferenceImage method.
func (*CreateReferenceImageRequest) Descriptor
func (*CreateReferenceImageRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateReferenceImageRequest.ProtoReflect.Descriptor instead.
func (*CreateReferenceImageRequest) GetParent
func (x *CreateReferenceImageRequest) GetParent() stringfunc (*CreateReferenceImageRequest) GetReferenceImage
func (x *CreateReferenceImageRequest) GetReferenceImage() *ReferenceImagefunc (*CreateReferenceImageRequest) GetReferenceImageId
func (x *CreateReferenceImageRequest) GetReferenceImageId() stringfunc (*CreateReferenceImageRequest) ProtoMessage
func (*CreateReferenceImageRequest) ProtoMessage()func (*CreateReferenceImageRequest) ProtoReflect
func (x *CreateReferenceImageRequest) ProtoReflect() protoreflect.Messagefunc (*CreateReferenceImageRequest) Reset
func (x *CreateReferenceImageRequest) Reset()func (*CreateReferenceImageRequest) String
func (x *CreateReferenceImageRequest) String() stringCropHint
type CropHint struct {
// The bounding polygon for the crop region. The coordinates of the bounding
// box are in the original image's scale.
BoundingPoly *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"`
// Confidence of this being a salient region. Range [0, 1].
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
// Fraction of importance of this salient region with respect to the original
// image.
ImportanceFraction float32 `protobuf:"fixed32,3,opt,name=importance_fraction,json=importanceFraction,proto3" json:"importance_fraction,omitempty"`
// contains filtered or unexported fields
}Single crop hint that is used to generate a new crop when serving an image.
func (*CropHint) Descriptor
Deprecated: Use CropHint.ProtoReflect.Descriptor instead.
func (*CropHint) GetBoundingPoly
func (x *CropHint) GetBoundingPoly() *BoundingPolyfunc (*CropHint) GetConfidence
func (*CropHint) GetImportanceFraction
func (*CropHint) ProtoMessage
func (*CropHint) ProtoMessage()func (*CropHint) ProtoReflect
func (x *CropHint) ProtoReflect() protoreflect.Messagefunc (*CropHint) Reset
func (x *CropHint) Reset()func (*CropHint) String
CropHintsAnnotation
type CropHintsAnnotation struct {
// Crop hint results.
CropHints []*CropHint `protobuf:"bytes,1,rep,name=crop_hints,json=cropHints,proto3" json:"crop_hints,omitempty"`
// contains filtered or unexported fields
}Set of crop hints that are used to generate new crops when serving images.
func (*CropHintsAnnotation) Descriptor
func (*CropHintsAnnotation) Descriptor() ([]byte, []int)Deprecated: Use CropHintsAnnotation.ProtoReflect.Descriptor instead.
func (*CropHintsAnnotation) GetCropHints
func (x *CropHintsAnnotation) GetCropHints() []*CropHintfunc (*CropHintsAnnotation) ProtoMessage
func (*CropHintsAnnotation) ProtoMessage()func (*CropHintsAnnotation) ProtoReflect
func (x *CropHintsAnnotation) ProtoReflect() protoreflect.Messagefunc (*CropHintsAnnotation) Reset
func (x *CropHintsAnnotation) Reset()func (*CropHintsAnnotation) String
func (x *CropHintsAnnotation) String() stringCropHintsParams
type CropHintsParams struct {
// Aspect ratios in floats, representing the ratio of the width to the height
// of the image. For example, if the desired aspect ratio is 4/3, the
// corresponding float value should be 1.33333. If not specified, the
// best possible crop is returned. The number of provided aspect ratios is
// limited to a maximum of 16; any aspect ratios provided after the 16th are
// ignored.
AspectRatios []float32 `protobuf:"fixed32,1,rep,packed,name=aspect_ratios,json=aspectRatios,proto3" json:"aspect_ratios,omitempty"`
// contains filtered or unexported fields
}Parameters for crop hints annotation request.
func (*CropHintsParams) Descriptor
func (*CropHintsParams) Descriptor() ([]byte, []int)Deprecated: Use CropHintsParams.ProtoReflect.Descriptor instead.
func (*CropHintsParams) GetAspectRatios
func (x *CropHintsParams) GetAspectRatios() []float32func (*CropHintsParams) ProtoMessage
func (*CropHintsParams) ProtoMessage()func (*CropHintsParams) ProtoReflect
func (x *CropHintsParams) ProtoReflect() protoreflect.Messagefunc (*CropHintsParams) Reset
func (x *CropHintsParams) Reset()func (*CropHintsParams) String
func (x *CropHintsParams) String() stringDeleteProductRequest
type DeleteProductRequest struct {
// Required. Resource name of product to delete.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the DeleteProduct method.
func (*DeleteProductRequest) Descriptor
func (*DeleteProductRequest) Descriptor() ([]byte, []int)Deprecated: Use DeleteProductRequest.ProtoReflect.Descriptor instead.
func (*DeleteProductRequest) GetName
func (x *DeleteProductRequest) GetName() stringfunc (*DeleteProductRequest) ProtoMessage
func (*DeleteProductRequest) ProtoMessage()func (*DeleteProductRequest) ProtoReflect
func (x *DeleteProductRequest) ProtoReflect() protoreflect.Messagefunc (*DeleteProductRequest) Reset
func (x *DeleteProductRequest) Reset()func (*DeleteProductRequest) String
func (x *DeleteProductRequest) String() stringDeleteProductSetRequest
type DeleteProductSetRequest struct {
// Required. Resource name of the ProductSet to delete.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the DeleteProductSet method.
func (*DeleteProductSetRequest) Descriptor
func (*DeleteProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use DeleteProductSetRequest.ProtoReflect.Descriptor instead.
func (*DeleteProductSetRequest) GetName
func (x *DeleteProductSetRequest) GetName() stringfunc (*DeleteProductSetRequest) ProtoMessage
func (*DeleteProductSetRequest) ProtoMessage()func (*DeleteProductSetRequest) ProtoReflect
func (x *DeleteProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*DeleteProductSetRequest) Reset
func (x *DeleteProductSetRequest) Reset()func (*DeleteProductSetRequest) String
func (x *DeleteProductSetRequest) String() stringDeleteReferenceImageRequest
type DeleteReferenceImageRequest struct {
// Required. The resource name of the reference image to delete.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the DeleteReferenceImage method.
func (*DeleteReferenceImageRequest) Descriptor
func (*DeleteReferenceImageRequest) Descriptor() ([]byte, []int)Deprecated: Use DeleteReferenceImageRequest.ProtoReflect.Descriptor instead.
func (*DeleteReferenceImageRequest) GetName
func (x *DeleteReferenceImageRequest) GetName() stringfunc (*DeleteReferenceImageRequest) ProtoMessage
func (*DeleteReferenceImageRequest) ProtoMessage()func (*DeleteReferenceImageRequest) ProtoReflect
func (x *DeleteReferenceImageRequest) ProtoReflect() protoreflect.Messagefunc (*DeleteReferenceImageRequest) Reset
func (x *DeleteReferenceImageRequest) Reset()func (*DeleteReferenceImageRequest) String
func (x *DeleteReferenceImageRequest) String() stringDominantColorsAnnotation
type DominantColorsAnnotation struct {
// RGB color values with their score and pixel fraction.
Colors []*ColorInfo `protobuf:"bytes,1,rep,name=colors,proto3" json:"colors,omitempty"`
// contains filtered or unexported fields
}Set of dominant colors and their corresponding scores.
func (*DominantColorsAnnotation) Descriptor
func (*DominantColorsAnnotation) Descriptor() ([]byte, []int)Deprecated: Use DominantColorsAnnotation.ProtoReflect.Descriptor instead.
func (*DominantColorsAnnotation) GetColors
func (x *DominantColorsAnnotation) GetColors() []*ColorInfofunc (*DominantColorsAnnotation) ProtoMessage
func (*DominantColorsAnnotation) ProtoMessage()func (*DominantColorsAnnotation) ProtoReflect
func (x *DominantColorsAnnotation) ProtoReflect() protoreflect.Messagefunc (*DominantColorsAnnotation) Reset
func (x *DominantColorsAnnotation) Reset()func (*DominantColorsAnnotation) String
func (x *DominantColorsAnnotation) String() stringEntityAnnotation
type EntityAnnotation struct {
// Opaque entity ID. Some IDs may be available in
// [Google Knowledge Graph Search
// API](https://developers.google.com/knowledge-graph/).
Mid string `protobuf:"bytes,1,opt,name=mid,proto3" json:"mid,omitempty"`
// The language code for the locale in which the entity textual
// `description` is expressed.
Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"`
// Entity textual description, expressed in its `locale` language.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Overall score of the result. Range [0, 1].
Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"`
// **Deprecated. Use `score` instead.**
// The accuracy of the entity detection in an image.
// For example, for an image in which the "Eiffel Tower" entity is detected,
// this field represents the confidence that there is a tower in the query
// image. Range [0, 1].
//
// Deprecated: Marked as deprecated in google/cloud/vision/v1/image_annotator.proto.
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
// The relevancy of the ICA (Image Content Annotation) label to the
// image. For example, the relevancy of "tower" is likely higher to an image
// containing the detected "Eiffel Tower" than to an image containing a
// detected distant towering building, even though the confidence that
// there is a tower in each image may be the same. Range [0, 1].
Topicality float32 `protobuf:"fixed32,6,opt,name=topicality,proto3" json:"topicality,omitempty"`
// Image region to which this entity belongs. Not produced
// for `LABEL_DETECTION` features.
BoundingPoly *BoundingPoly `protobuf:"bytes,7,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"`
// The location information for the detected entity. Multiple
// `LocationInfo` elements can be present because one location may
// indicate the location of the scene in the image, and another location
// may indicate the location of the place where the image was taken.
// Location information is usually present for landmarks.
Locations []*LocationInfo `protobuf:"bytes,8,rep,name=locations,proto3" json:"locations,omitempty"`
// Some entities may have optional user-supplied `Property` (name/value)
// fields, such a score or string that qualifies the entity.
Properties []*Property `protobuf:"bytes,9,rep,name=properties,proto3" json:"properties,omitempty"`
// contains filtered or unexported fields
}Set of detected entity features.
func (*EntityAnnotation) Descriptor
func (*EntityAnnotation) Descriptor() ([]byte, []int)Deprecated: Use EntityAnnotation.ProtoReflect.Descriptor instead.
func (*EntityAnnotation) GetBoundingPoly
func (x *EntityAnnotation) GetBoundingPoly() *BoundingPolyfunc (*EntityAnnotation) GetConfidence
func (x *EntityAnnotation) GetConfidence() float32Deprecated: Marked as deprecated in google/cloud/vision/v1/image_annotator.proto.
func (*EntityAnnotation) GetDescription
func (x *EntityAnnotation) GetDescription() stringfunc (*EntityAnnotation) GetLocale
func (x *EntityAnnotation) GetLocale() stringfunc (*EntityAnnotation) GetLocations
func (x *EntityAnnotation) GetLocations() []*LocationInfofunc (*EntityAnnotation) GetMid
func (x *EntityAnnotation) GetMid() stringfunc (*EntityAnnotation) GetProperties
func (x *EntityAnnotation) GetProperties() []*Propertyfunc (*EntityAnnotation) GetScore
func (x *EntityAnnotation) GetScore() float32func (*EntityAnnotation) GetTopicality
func (x *EntityAnnotation) GetTopicality() float32func (*EntityAnnotation) ProtoMessage
func (*EntityAnnotation) ProtoMessage()func (*EntityAnnotation) ProtoReflect
func (x *EntityAnnotation) ProtoReflect() protoreflect.Messagefunc (*EntityAnnotation) Reset
func (x *EntityAnnotation) Reset()func (*EntityAnnotation) String
func (x *EntityAnnotation) String() stringFaceAnnotation
type FaceAnnotation struct {
// The bounding polygon around the face. The coordinates of the bounding box
// are in the original image's scale.
// The bounding box is computed to "frame" the face in accordance with human
// expectations. It is based on the landmarker results.
// Note that one or more x and/or y coordinates may not be generated in the
// `BoundingPoly` (the polygon will be unbounded) if only a partial face
// appears in the image to be annotated.
BoundingPoly *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"`
// The `fd_bounding_poly` bounding polygon is tighter than the
// `boundingPoly`, and encloses only the skin part of the face. Typically, it
// is used to eliminate the face from any image analysis that detects the
// "amount of skin" visible in an image. It is not based on the
// landmarker results, only on the initial face detection, hence
// the fd (face detection) prefix.
FdBoundingPoly *BoundingPoly `protobuf:"bytes,2,opt,name=fd_bounding_poly,json=fdBoundingPoly,proto3" json:"fd_bounding_poly,omitempty"`
// Detected face landmarks.
Landmarks []*FaceAnnotation_Landmark `protobuf:"bytes,3,rep,name=landmarks,proto3" json:"landmarks,omitempty"`
// Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
// of the face relative to the image vertical about the axis perpendicular to
// the face. Range [-180,180].
RollAngle float32 `protobuf:"fixed32,4,opt,name=roll_angle,json=rollAngle,proto3" json:"roll_angle,omitempty"`
// Yaw angle, which indicates the leftward/rightward angle that the face is
// pointing relative to the vertical plane perpendicular to the image. Range
// [-180,180].
PanAngle float32 `protobuf:"fixed32,5,opt,name=pan_angle,json=panAngle,proto3" json:"pan_angle,omitempty"`
// Pitch angle, which indicates the upwards/downwards angle that the face is
// pointing relative to the image's horizontal plane. Range [-180,180].
TiltAngle float32 `protobuf:"fixed32,6,opt,name=tilt_angle,json=tiltAngle,proto3" json:"tilt_angle,omitempty"`
// Detection confidence. Range [0, 1].
DetectionConfidence float32 `protobuf:"fixed32,7,opt,name=detection_confidence,json=detectionConfidence,proto3" json:"detection_confidence,omitempty"`
// Face landmarking confidence. Range [0, 1].
LandmarkingConfidence float32 `protobuf:"fixed32,8,opt,name=landmarking_confidence,json=landmarkingConfidence,proto3" json:"landmarking_confidence,omitempty"`
// Joy likelihood.
JoyLikelihood Likelihood `protobuf:"varint,9,opt,name=joy_likelihood,json=joyLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"joy_likelihood,omitempty"`
// Sorrow likelihood.
SorrowLikelihood Likelihood `protobuf:"varint,10,opt,name=sorrow_likelihood,json=sorrowLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"sorrow_likelihood,omitempty"`
// Anger likelihood.
AngerLikelihood Likelihood `protobuf:"varint,11,opt,name=anger_likelihood,json=angerLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"anger_likelihood,omitempty"`
// Surprise likelihood.
SurpriseLikelihood Likelihood `protobuf:"varint,12,opt,name=surprise_likelihood,json=surpriseLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"surprise_likelihood,omitempty"`
// Under-exposed likelihood.
UnderExposedLikelihood Likelihood `protobuf:"varint,13,opt,name=under_exposed_likelihood,json=underExposedLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"under_exposed_likelihood,omitempty"`
// Blurred likelihood.
BlurredLikelihood Likelihood `protobuf:"varint,14,opt,name=blurred_likelihood,json=blurredLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"blurred_likelihood,omitempty"`
// Headwear likelihood.
HeadwearLikelihood Likelihood `protobuf:"varint,15,opt,name=headwear_likelihood,json=headwearLikelihood,proto3,enum=google.cloud.vision.v1.Likelihood" json:"headwear_likelihood,omitempty"`
// contains filtered or unexported fields
}A face annotation object contains the results of face detection.
func (*FaceAnnotation) Descriptor
func (*FaceAnnotation) Descriptor() ([]byte, []int)Deprecated: Use FaceAnnotation.ProtoReflect.Descriptor instead.
func (*FaceAnnotation) GetAngerLikelihood
func (x *FaceAnnotation) GetAngerLikelihood() Likelihoodfunc (*FaceAnnotation) GetBlurredLikelihood
func (x *FaceAnnotation) GetBlurredLikelihood() Likelihoodfunc (*FaceAnnotation) GetBoundingPoly
func (x *FaceAnnotation) GetBoundingPoly() *BoundingPolyfunc (*FaceAnnotation) GetDetectionConfidence
func (x *FaceAnnotation) GetDetectionConfidence() float32func (*FaceAnnotation) GetFdBoundingPoly
func (x *FaceAnnotation) GetFdBoundingPoly() *BoundingPolyfunc (*FaceAnnotation) GetHeadwearLikelihood
func (x *FaceAnnotation) GetHeadwearLikelihood() Likelihoodfunc (*FaceAnnotation) GetJoyLikelihood
func (x *FaceAnnotation) GetJoyLikelihood() Likelihoodfunc (*FaceAnnotation) GetLandmarkingConfidence
func (x *FaceAnnotation) GetLandmarkingConfidence() float32func (*FaceAnnotation) GetLandmarks
func (x *FaceAnnotation) GetLandmarks() []*FaceAnnotation_Landmarkfunc (*FaceAnnotation) GetPanAngle
func (x *FaceAnnotation) GetPanAngle() float32func (*FaceAnnotation) GetRollAngle
func (x *FaceAnnotation) GetRollAngle() float32func (*FaceAnnotation) GetSorrowLikelihood
func (x *FaceAnnotation) GetSorrowLikelihood() Likelihoodfunc (*FaceAnnotation) GetSurpriseLikelihood
func (x *FaceAnnotation) GetSurpriseLikelihood() Likelihoodfunc (*FaceAnnotation) GetTiltAngle
func (x *FaceAnnotation) GetTiltAngle() float32func (*FaceAnnotation) GetUnderExposedLikelihood
func (x *FaceAnnotation) GetUnderExposedLikelihood() Likelihoodfunc (*FaceAnnotation) ProtoMessage
func (*FaceAnnotation) ProtoMessage()func (*FaceAnnotation) ProtoReflect
func (x *FaceAnnotation) ProtoReflect() protoreflect.Messagefunc (*FaceAnnotation) Reset
func (x *FaceAnnotation) Reset()func (*FaceAnnotation) String
func (x *FaceAnnotation) String() stringFaceAnnotation_Landmark
type FaceAnnotation_Landmark struct {
// Face landmark type.
Type FaceAnnotation_Landmark_Type `protobuf:"varint,3,opt,name=type,proto3,enum=google.cloud.vision.v1.FaceAnnotation_Landmark_Type" json:"type,omitempty"`
// Face landmark position.
Position *Position `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"`
// contains filtered or unexported fields
}A face-specific landmark (for example, a face feature).
func (*FaceAnnotation_Landmark) Descriptor
func (*FaceAnnotation_Landmark) Descriptor() ([]byte, []int)Deprecated: Use FaceAnnotation_Landmark.ProtoReflect.Descriptor instead.
func (*FaceAnnotation_Landmark) GetPosition
func (x *FaceAnnotation_Landmark) GetPosition() *Positionfunc (*FaceAnnotation_Landmark) GetType
func (x *FaceAnnotation_Landmark) GetType() FaceAnnotation_Landmark_Typefunc (*FaceAnnotation_Landmark) ProtoMessage
func (*FaceAnnotation_Landmark) ProtoMessage()func (*FaceAnnotation_Landmark) ProtoReflect
func (x *FaceAnnotation_Landmark) ProtoReflect() protoreflect.Messagefunc (*FaceAnnotation_Landmark) Reset
func (x *FaceAnnotation_Landmark) Reset()func (*FaceAnnotation_Landmark) String
func (x *FaceAnnotation_Landmark) String() stringFaceAnnotation_Landmark_Type
type FaceAnnotation_Landmark_Type int32Face landmark (feature) type.
Left and right are defined from the vantage of the viewer of the image
without considering mirror projections typical of photos. So, LEFT_EYE,
typically, is the person's right eye.
FaceAnnotation_Landmark_UNKNOWN_LANDMARK, FaceAnnotation_Landmark_LEFT_EYE, FaceAnnotation_Landmark_RIGHT_EYE, FaceAnnotation_Landmark_LEFT_OF_LEFT_EYEBROW, FaceAnnotation_Landmark_RIGHT_OF_LEFT_EYEBROW, FaceAnnotation_Landmark_LEFT_OF_RIGHT_EYEBROW, FaceAnnotation_Landmark_RIGHT_OF_RIGHT_EYEBROW, FaceAnnotation_Landmark_MIDPOINT_BETWEEN_EYES, FaceAnnotation_Landmark_NOSE_TIP, FaceAnnotation_Landmark_UPPER_LIP, FaceAnnotation_Landmark_LOWER_LIP, FaceAnnotation_Landmark_MOUTH_LEFT, FaceAnnotation_Landmark_MOUTH_RIGHT, FaceAnnotation_Landmark_MOUTH_CENTER, FaceAnnotation_Landmark_NOSE_BOTTOM_RIGHT, FaceAnnotation_Landmark_NOSE_BOTTOM_LEFT, FaceAnnotation_Landmark_NOSE_BOTTOM_CENTER, FaceAnnotation_Landmark_LEFT_EYE_TOP_BOUNDARY, FaceAnnotation_Landmark_LEFT_EYE_RIGHT_CORNER, FaceAnnotation_Landmark_LEFT_EYE_BOTTOM_BOUNDARY, FaceAnnotation_Landmark_LEFT_EYE_LEFT_CORNER, FaceAnnotation_Landmark_RIGHT_EYE_TOP_BOUNDARY, FaceAnnotation_Landmark_RIGHT_EYE_RIGHT_CORNER, FaceAnnotation_Landmark_RIGHT_EYE_BOTTOM_BOUNDARY, FaceAnnotation_Landmark_RIGHT_EYE_LEFT_CORNER, FaceAnnotation_Landmark_LEFT_EYEBROW_UPPER_MIDPOINT, FaceAnnotation_Landmark_RIGHT_EYEBROW_UPPER_MIDPOINT, FaceAnnotation_Landmark_LEFT_EAR_TRAGION, FaceAnnotation_Landmark_RIGHT_EAR_TRAGION, FaceAnnotation_Landmark_LEFT_EYE_PUPIL, FaceAnnotation_Landmark_RIGHT_EYE_PUPIL, FaceAnnotation_Landmark_FOREHEAD_GLABELLA, FaceAnnotation_Landmark_CHIN_GNATHION, FaceAnnotation_Landmark_CHIN_LEFT_GONION, FaceAnnotation_Landmark_CHIN_RIGHT_GONION, FaceAnnotation_Landmark_LEFT_CHEEK_CENTER, FaceAnnotation_Landmark_RIGHT_CHEEK_CENTER
const (
// Unknown face landmark detected. Should not be filled.
FaceAnnotation_Landmark_UNKNOWN_LANDMARK FaceAnnotation_Landmark_Type = 0
// Left eye.
FaceAnnotation_Landmark_LEFT_EYE FaceAnnotation_Landmark_Type = 1
// Right eye.
FaceAnnotation_Landmark_RIGHT_EYE FaceAnnotation_Landmark_Type = 2
// Left of left eyebrow.
FaceAnnotation_Landmark_LEFT_OF_LEFT_EYEBROW FaceAnnotation_Landmark_Type = 3
// Right of left eyebrow.
FaceAnnotation_Landmark_RIGHT_OF_LEFT_EYEBROW FaceAnnotation_Landmark_Type = 4
// Left of right eyebrow.
FaceAnnotation_Landmark_LEFT_OF_RIGHT_EYEBROW FaceAnnotation_Landmark_Type = 5
// Right of right eyebrow.
FaceAnnotation_Landmark_RIGHT_OF_RIGHT_EYEBROW FaceAnnotation_Landmark_Type = 6
// Midpoint between eyes.
FaceAnnotation_Landmark_MIDPOINT_BETWEEN_EYES FaceAnnotation_Landmark_Type = 7
// Nose tip.
FaceAnnotation_Landmark_NOSE_TIP FaceAnnotation_Landmark_Type = 8
// Upper lip.
FaceAnnotation_Landmark_UPPER_LIP FaceAnnotation_Landmark_Type = 9
// Lower lip.
FaceAnnotation_Landmark_LOWER_LIP FaceAnnotation_Landmark_Type = 10
// Mouth left.
FaceAnnotation_Landmark_MOUTH_LEFT FaceAnnotation_Landmark_Type = 11
// Mouth right.
FaceAnnotation_Landmark_MOUTH_RIGHT FaceAnnotation_Landmark_Type = 12
// Mouth center.
FaceAnnotation_Landmark_MOUTH_CENTER FaceAnnotation_Landmark_Type = 13
// Nose, bottom right.
FaceAnnotation_Landmark_NOSE_BOTTOM_RIGHT FaceAnnotation_Landmark_Type = 14
// Nose, bottom left.
FaceAnnotation_Landmark_NOSE_BOTTOM_LEFT FaceAnnotation_Landmark_Type = 15
// Nose, bottom center.
FaceAnnotation_Landmark_NOSE_BOTTOM_CENTER FaceAnnotation_Landmark_Type = 16
// Left eye, top boundary.
FaceAnnotation_Landmark_LEFT_EYE_TOP_BOUNDARY FaceAnnotation_Landmark_Type = 17
// Left eye, right corner.
FaceAnnotation_Landmark_LEFT_EYE_RIGHT_CORNER FaceAnnotation_Landmark_Type = 18
// Left eye, bottom boundary.
FaceAnnotation_Landmark_LEFT_EYE_BOTTOM_BOUNDARY FaceAnnotation_Landmark_Type = 19
// Left eye, left corner.
FaceAnnotation_Landmark_LEFT_EYE_LEFT_CORNER FaceAnnotation_Landmark_Type = 20
// Right eye, top boundary.
FaceAnnotation_Landmark_RIGHT_EYE_TOP_BOUNDARY FaceAnnotation_Landmark_Type = 21
// Right eye, right corner.
FaceAnnotation_Landmark_RIGHT_EYE_RIGHT_CORNER FaceAnnotation_Landmark_Type = 22
// Right eye, bottom boundary.
FaceAnnotation_Landmark_RIGHT_EYE_BOTTOM_BOUNDARY FaceAnnotation_Landmark_Type = 23
// Right eye, left corner.
FaceAnnotation_Landmark_RIGHT_EYE_LEFT_CORNER FaceAnnotation_Landmark_Type = 24
// Left eyebrow, upper midpoint.
FaceAnnotation_Landmark_LEFT_EYEBROW_UPPER_MIDPOINT FaceAnnotation_Landmark_Type = 25
// Right eyebrow, upper midpoint.
FaceAnnotation_Landmark_RIGHT_EYEBROW_UPPER_MIDPOINT FaceAnnotation_Landmark_Type = 26
// Left ear tragion.
FaceAnnotation_Landmark_LEFT_EAR_TRAGION FaceAnnotation_Landmark_Type = 27
// Right ear tragion.
FaceAnnotation_Landmark_RIGHT_EAR_TRAGION FaceAnnotation_Landmark_Type = 28
// Left eye pupil.
FaceAnnotation_Landmark_LEFT_EYE_PUPIL FaceAnnotation_Landmark_Type = 29
// Right eye pupil.
FaceAnnotation_Landmark_RIGHT_EYE_PUPIL FaceAnnotation_Landmark_Type = 30
// Forehead glabella.
FaceAnnotation_Landmark_FOREHEAD_GLABELLA FaceAnnotation_Landmark_Type = 31
// Chin gnathion.
FaceAnnotation_Landmark_CHIN_GNATHION FaceAnnotation_Landmark_Type = 32
// Chin left gonion.
FaceAnnotation_Landmark_CHIN_LEFT_GONION FaceAnnotation_Landmark_Type = 33
// Chin right gonion.
FaceAnnotation_Landmark_CHIN_RIGHT_GONION FaceAnnotation_Landmark_Type = 34
// Left cheek center.
FaceAnnotation_Landmark_LEFT_CHEEK_CENTER FaceAnnotation_Landmark_Type = 35
// Right cheek center.
FaceAnnotation_Landmark_RIGHT_CHEEK_CENTER FaceAnnotation_Landmark_Type = 36
)func (FaceAnnotation_Landmark_Type) Descriptor
func (FaceAnnotation_Landmark_Type) Descriptor() protoreflect.EnumDescriptorfunc (FaceAnnotation_Landmark_Type) Enum
func (x FaceAnnotation_Landmark_Type) Enum() *FaceAnnotation_Landmark_Typefunc (FaceAnnotation_Landmark_Type) EnumDescriptor
func (FaceAnnotation_Landmark_Type) EnumDescriptor() ([]byte, []int)Deprecated: Use FaceAnnotation_Landmark_Type.Descriptor instead.
func (FaceAnnotation_Landmark_Type) Number
func (x FaceAnnotation_Landmark_Type) Number() protoreflect.EnumNumberfunc (FaceAnnotation_Landmark_Type) String
func (x FaceAnnotation_Landmark_Type) String() stringfunc (FaceAnnotation_Landmark_Type) Type
func (FaceAnnotation_Landmark_Type) Type() protoreflect.EnumTypeFeature
type Feature struct {
// The feature type.
Type Feature_Type `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.vision.v1.Feature_Type" json:"type,omitempty"`
// Maximum number of results of this type. Does not apply to
// `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
MaxResults int32 `protobuf:"varint,2,opt,name=max_results,json=maxResults,proto3" json:"max_results,omitempty"`
// Model to use for the feature.
// Supported values: "builtin/stable" (the default if unset) and
// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
// support "builtin/weekly" for the bleeding edge release updated weekly.
Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
// contains filtered or unexported fields
}The type of Google Cloud Vision API detection to perform, and the maximum
number of results to return for that type. Multiple Feature objects can
be specified in the features list.
func (*Feature) Descriptor
Deprecated: Use Feature.ProtoReflect.Descriptor instead.
func (*Feature) GetMaxResults
func (*Feature) GetModel
func (*Feature) GetType
func (x *Feature) GetType() Feature_Typefunc (*Feature) ProtoMessage
func (*Feature) ProtoMessage()func (*Feature) ProtoReflect
func (x *Feature) ProtoReflect() protoreflect.Messagefunc (*Feature) Reset
func (x *Feature) Reset()func (*Feature) String
Feature_Type
type Feature_Type int32Type of Google Cloud Vision API feature to be extracted.
Feature_TYPE_UNSPECIFIED, Feature_FACE_DETECTION, Feature_LANDMARK_DETECTION, Feature_LOGO_DETECTION, Feature_LABEL_DETECTION, Feature_TEXT_DETECTION, Feature_DOCUMENT_TEXT_DETECTION, Feature_SAFE_SEARCH_DETECTION, Feature_IMAGE_PROPERTIES, Feature_CROP_HINTS, Feature_WEB_DETECTION, Feature_PRODUCT_SEARCH, Feature_OBJECT_LOCALIZATION
const (
// Unspecified feature type.
Feature_TYPE_UNSPECIFIED Feature_Type = 0
// Run face detection.
Feature_FACE_DETECTION Feature_Type = 1
// Run landmark detection.
Feature_LANDMARK_DETECTION Feature_Type = 2
// Run logo detection.
Feature_LOGO_DETECTION Feature_Type = 3
// Run label detection.
Feature_LABEL_DETECTION Feature_Type = 4
// Run text detection / optical character recognition (OCR). Text detection
// is optimized for areas of text within a larger image; if the image is
// a document, use `DOCUMENT_TEXT_DETECTION` instead.
Feature_TEXT_DETECTION Feature_Type = 5
// Run dense text document OCR. Takes precedence when both
// `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
Feature_DOCUMENT_TEXT_DETECTION Feature_Type = 11
// Run Safe Search to detect potentially unsafe
// or undesirable content.
Feature_SAFE_SEARCH_DETECTION Feature_Type = 6
// Compute a set of image properties, such as the
// image's dominant colors.
Feature_IMAGE_PROPERTIES Feature_Type = 7
// Run crop hints.
Feature_CROP_HINTS Feature_Type = 9
// Run web detection.
Feature_WEB_DETECTION Feature_Type = 10
// Run Product Search.
Feature_PRODUCT_SEARCH Feature_Type = 12
// Run localizer for object detection.
Feature_OBJECT_LOCALIZATION Feature_Type = 19
)func (Feature_Type) Descriptor
func (Feature_Type) Descriptor() protoreflect.EnumDescriptorfunc (Feature_Type) Enum
func (x Feature_Type) Enum() *Feature_Typefunc (Feature_Type) EnumDescriptor
func (Feature_Type) EnumDescriptor() ([]byte, []int)Deprecated: Use Feature_Type.Descriptor instead.
func (Feature_Type) Number
func (x Feature_Type) Number() protoreflect.EnumNumberfunc (Feature_Type) String
func (x Feature_Type) String() stringfunc (Feature_Type) Type
func (Feature_Type) Type() protoreflect.EnumTypeGcsDestination
type GcsDestination struct {
// Google Cloud Storage URI prefix where the results will be stored. Results
// will be in JSON format and preceded by its corresponding input URI prefix.
// This field can either represent a gcs file prefix or gcs directory. In
// either case, the uri should be unique because in order to get all of the
// output files, you will need to do a wildcard gcs search on the uri prefix
// you provide.
//
// Examples:
//
// * File Prefix: gs://bucket-name/here/filenameprefix The output files
// will be created in gs://bucket-name/here/ and the names of the
// output files will begin with "filenameprefix".
//
// * Directory Prefix: gs://bucket-name/some/location/ The output files
// will be created in gs://bucket-name/some/location/ and the names of the
// output files could be anything because there was no filename prefix
// specified.
//
// If multiple outputs, each response is still AnnotateFileResponse, each of
// which contains some subset of the full list of AnnotateImageResponse.
// Multiple outputs can happen if, for example, the output JSON is too large
// and overflows into multiple sharded files.
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
// contains filtered or unexported fields
}The Google Cloud Storage location where the output will be written to.
func (*GcsDestination) Descriptor
func (*GcsDestination) Descriptor() ([]byte, []int)Deprecated: Use GcsDestination.ProtoReflect.Descriptor instead.
func (*GcsDestination) GetUri
func (x *GcsDestination) GetUri() stringfunc (*GcsDestination) ProtoMessage
func (*GcsDestination) ProtoMessage()func (*GcsDestination) ProtoReflect
func (x *GcsDestination) ProtoReflect() protoreflect.Messagefunc (*GcsDestination) Reset
func (x *GcsDestination) Reset()func (*GcsDestination) String
func (x *GcsDestination) String() stringGcsSource
type GcsSource struct {
// Google Cloud Storage URI for the input file. This must only be a
// Google Cloud Storage object. Wildcards are not currently supported.
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
// contains filtered or unexported fields
}The Google Cloud Storage location where the input will be read from.
func (*GcsSource) Descriptor
Deprecated: Use GcsSource.ProtoReflect.Descriptor instead.
func (*GcsSource) GetUri
func (*GcsSource) ProtoMessage
func (*GcsSource) ProtoMessage()func (*GcsSource) ProtoReflect
func (x *GcsSource) ProtoReflect() protoreflect.Messagefunc (*GcsSource) Reset
func (x *GcsSource) Reset()func (*GcsSource) String
GetProductRequest
type GetProductRequest struct {
// Required. Resource name of the Product to get.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the GetProduct method.
func (*GetProductRequest) Descriptor
func (*GetProductRequest) Descriptor() ([]byte, []int)Deprecated: Use GetProductRequest.ProtoReflect.Descriptor instead.
func (*GetProductRequest) GetName
func (x *GetProductRequest) GetName() stringfunc (*GetProductRequest) ProtoMessage
func (*GetProductRequest) ProtoMessage()func (*GetProductRequest) ProtoReflect
func (x *GetProductRequest) ProtoReflect() protoreflect.Messagefunc (*GetProductRequest) Reset
func (x *GetProductRequest) Reset()func (*GetProductRequest) String
func (x *GetProductRequest) String() stringGetProductSetRequest
type GetProductSetRequest struct {
// Required. Resource name of the ProductSet to get.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the GetProductSet method.
func (*GetProductSetRequest) Descriptor
func (*GetProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use GetProductSetRequest.ProtoReflect.Descriptor instead.
func (*GetProductSetRequest) GetName
func (x *GetProductSetRequest) GetName() stringfunc (*GetProductSetRequest) ProtoMessage
func (*GetProductSetRequest) ProtoMessage()func (*GetProductSetRequest) ProtoReflect
func (x *GetProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*GetProductSetRequest) Reset
func (x *GetProductSetRequest) Reset()func (*GetProductSetRequest) String
func (x *GetProductSetRequest) String() stringGetReferenceImageRequest
type GetReferenceImageRequest struct {
// Required. The resource name of the ReferenceImage to get.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the GetReferenceImage method.
func (*GetReferenceImageRequest) Descriptor
func (*GetReferenceImageRequest) Descriptor() ([]byte, []int)Deprecated: Use GetReferenceImageRequest.ProtoReflect.Descriptor instead.
func (*GetReferenceImageRequest) GetName
func (x *GetReferenceImageRequest) GetName() stringfunc (*GetReferenceImageRequest) ProtoMessage
func (*GetReferenceImageRequest) ProtoMessage()func (*GetReferenceImageRequest) ProtoReflect
func (x *GetReferenceImageRequest) ProtoReflect() protoreflect.Messagefunc (*GetReferenceImageRequest) Reset
func (x *GetReferenceImageRequest) Reset()func (*GetReferenceImageRequest) String
func (x *GetReferenceImageRequest) String() stringImage
type Image struct {
// Image content, represented as a stream of bytes.
// Note: As with all `bytes` fields, protobuffers use a pure binary
// representation, whereas JSON representations use base64.
//
// Currently, this field only works for BatchAnnotateImages requests. It does
// not work for AsyncBatchAnnotateImages requests.
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// Google Cloud Storage image location, or publicly-accessible image
// URL. If both `content` and `source` are provided for an image, `content`
// takes precedence and is used to perform the image annotation request.
Source *ImageSource `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
// contains filtered or unexported fields
}Client image to perform Google Cloud Vision API tasks over.
func (*Image) Descriptor
Deprecated: Use Image.ProtoReflect.Descriptor instead.
func (*Image) GetContent
func (*Image) GetSource
func (x *Image) GetSource() *ImageSourcefunc (*Image) ProtoMessage
func (*Image) ProtoMessage()func (*Image) ProtoReflect
func (x *Image) ProtoReflect() protoreflect.Messagefunc (*Image) Reset
func (x *Image) Reset()func (*Image) String
ImageAnnotationContext
type ImageAnnotationContext struct {
// The URI of the file used to produce the image.
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
// If the file was a PDF or TIFF, this field gives the page number within
// the file used to produce the image.
PageNumber int32 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
// contains filtered or unexported fields
}If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
func (*ImageAnnotationContext) Descriptor
func (*ImageAnnotationContext) Descriptor() ([]byte, []int)Deprecated: Use ImageAnnotationContext.ProtoReflect.Descriptor instead.
func (*ImageAnnotationContext) GetPageNumber
func (x *ImageAnnotationContext) GetPageNumber() int32func (*ImageAnnotationContext) GetUri
func (x *ImageAnnotationContext) GetUri() stringfunc (*ImageAnnotationContext) ProtoMessage
func (*ImageAnnotationContext) ProtoMessage()func (*ImageAnnotationContext) ProtoReflect
func (x *ImageAnnotationContext) ProtoReflect() protoreflect.Messagefunc (*ImageAnnotationContext) Reset
func (x *ImageAnnotationContext) Reset()func (*ImageAnnotationContext) String
func (x *ImageAnnotationContext) String() stringImageAnnotatorClient
type ImageAnnotatorClient interface {
// Run image detection and annotation for a batch of images.
BatchAnnotateImages(ctx context.Context, in *BatchAnnotateImagesRequest, opts ...grpc.CallOption) (*BatchAnnotateImagesResponse, error)
// Service that performs image detection and annotation for a batch of files.
// Now only "application/pdf", "image/tiff" and "image/gif" are supported.
//
// This service will extract at most 5 (customers can specify which 5 in
// AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
// file provided and perform detection and annotation for each image
// extracted.
BatchAnnotateFiles(ctx context.Context, in *BatchAnnotateFilesRequest, opts ...grpc.CallOption) (*BatchAnnotateFilesResponse, error)
// Run asynchronous image detection and annotation for a list of images.
//
// Progress and results can be retrieved through the
// `google.longrunning.Operations` interface.
// `Operation.metadata` contains `OperationMetadata` (metadata).
// `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
//
// This service will write image annotation outputs to json files in customer
// GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
AsyncBatchAnnotateImages(ctx context.Context, in *AsyncBatchAnnotateImagesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Run asynchronous image detection and annotation for a list of generic
// files, such as PDF files, which may contain multiple pages and multiple
// images per page. Progress and results can be retrieved through the
// `google.longrunning.Operations` interface.
// `Operation.metadata` contains `OperationMetadata` (metadata).
// `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
AsyncBatchAnnotateFiles(ctx context.Context, in *AsyncBatchAnnotateFilesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
}ImageAnnotatorClient is the client API for ImageAnnotator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewImageAnnotatorClient
func NewImageAnnotatorClient(cc grpc.ClientConnInterface) ImageAnnotatorClientImageAnnotatorServer
type ImageAnnotatorServer interface {
// Run image detection and annotation for a batch of images.
BatchAnnotateImages(context.Context, *BatchAnnotateImagesRequest) (*BatchAnnotateImagesResponse, error)
// Service that performs image detection and annotation for a batch of files.
// Now only "application/pdf", "image/tiff" and "image/gif" are supported.
//
// This service will extract at most 5 (customers can specify which 5 in
// AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
// file provided and perform detection and annotation for each image
// extracted.
BatchAnnotateFiles(context.Context, *BatchAnnotateFilesRequest) (*BatchAnnotateFilesResponse, error)
// Run asynchronous image detection and annotation for a list of images.
//
// Progress and results can be retrieved through the
// `google.longrunning.Operations` interface.
// `Operation.metadata` contains `OperationMetadata` (metadata).
// `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
//
// This service will write image annotation outputs to json files in customer
// GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
AsyncBatchAnnotateImages(context.Context, *AsyncBatchAnnotateImagesRequest) (*longrunningpb.Operation, error)
// Run asynchronous image detection and annotation for a list of generic
// files, such as PDF files, which may contain multiple pages and multiple
// images per page. Progress and results can be retrieved through the
// `google.longrunning.Operations` interface.
// `Operation.metadata` contains `OperationMetadata` (metadata).
// `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
AsyncBatchAnnotateFiles(context.Context, *AsyncBatchAnnotateFilesRequest) (*longrunningpb.Operation, error)
}ImageAnnotatorServer is the server API for ImageAnnotator service. All implementations should embed UnimplementedImageAnnotatorServer for forward compatibility
ImageContext
type ImageContext struct {
// Not used.
LatLongRect *LatLongRect `protobuf:"bytes,1,opt,name=lat_long_rect,json=latLongRect,proto3" json:"lat_long_rect,omitempty"`
// List of languages to use for TEXT_DETECTION. In most cases, an empty value
// yields the best results since it enables automatic language detection. For
// languages based on the Latin alphabet, setting `language_hints` is not
// needed. In rare cases, when the language of the text in the image is known,
// setting a hint will help get better results (although it will be a
// significant hindrance if the hint is wrong). Text detection returns an
// error if one or more of the specified languages is not one of the
// [supported languages](https://cloud.google.com/vision/docs/languages).
LanguageHints []string `protobuf:"bytes,2,rep,name=language_hints,json=languageHints,proto3" json:"language_hints,omitempty"`
// Parameters for crop hints annotation request.
CropHintsParams *CropHintsParams `protobuf:"bytes,4,opt,name=crop_hints_params,json=cropHintsParams,proto3" json:"crop_hints_params,omitempty"`
// Parameters for product search.
ProductSearchParams *ProductSearchParams `protobuf:"bytes,5,opt,name=product_search_params,json=productSearchParams,proto3" json:"product_search_params,omitempty"`
// Parameters for web detection.
WebDetectionParams *WebDetectionParams `protobuf:"bytes,6,opt,name=web_detection_params,json=webDetectionParams,proto3" json:"web_detection_params,omitempty"`
// Parameters for text detection and document text detection.
TextDetectionParams *TextDetectionParams `protobuf:"bytes,12,opt,name=text_detection_params,json=textDetectionParams,proto3" json:"text_detection_params,omitempty"`
// contains filtered or unexported fields
}Image context and/or feature-specific parameters.
func (*ImageContext) Descriptor
func (*ImageContext) Descriptor() ([]byte, []int)Deprecated: Use ImageContext.ProtoReflect.Descriptor instead.
func (*ImageContext) GetCropHintsParams
func (x *ImageContext) GetCropHintsParams() *CropHintsParamsfunc (*ImageContext) GetLanguageHints
func (x *ImageContext) GetLanguageHints() []stringfunc (*ImageContext) GetLatLongRect
func (x *ImageContext) GetLatLongRect() *LatLongRectfunc (*ImageContext) GetProductSearchParams
func (x *ImageContext) GetProductSearchParams() *ProductSearchParamsfunc (*ImageContext) GetTextDetectionParams
func (x *ImageContext) GetTextDetectionParams() *TextDetectionParamsfunc (*ImageContext) GetWebDetectionParams
func (x *ImageContext) GetWebDetectionParams() *WebDetectionParamsfunc (*ImageContext) ProtoMessage
func (*ImageContext) ProtoMessage()func (*ImageContext) ProtoReflect
func (x *ImageContext) ProtoReflect() protoreflect.Messagefunc (*ImageContext) Reset
func (x *ImageContext) Reset()func (*ImageContext) String
func (x *ImageContext) String() stringImageProperties
type ImageProperties struct {
// If present, dominant colors completed successfully.
DominantColors *DominantColorsAnnotation `protobuf:"bytes,1,opt,name=dominant_colors,json=dominantColors,proto3" json:"dominant_colors,omitempty"`
// contains filtered or unexported fields
}Stores image properties, such as dominant colors.
func (*ImageProperties) Descriptor
func (*ImageProperties) Descriptor() ([]byte, []int)Deprecated: Use ImageProperties.ProtoReflect.Descriptor instead.
func (*ImageProperties) GetDominantColors
func (x *ImageProperties) GetDominantColors() *DominantColorsAnnotationfunc (*ImageProperties) ProtoMessage
func (*ImageProperties) ProtoMessage()func (*ImageProperties) ProtoReflect
func (x *ImageProperties) ProtoReflect() protoreflect.Messagefunc (*ImageProperties) Reset
func (x *ImageProperties) Reset()func (*ImageProperties) String
func (x *ImageProperties) String() stringImageSource
type ImageSource struct {
// **Use `image_uri` instead.**
//
// The Google Cloud Storage URI of the form
// `gs://bucket_name/object_name`. Object versioning is not supported. See
// [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
GcsImageUri string `protobuf:"bytes,1,opt,name=gcs_image_uri,json=gcsImageUri,proto3" json:"gcs_image_uri,omitempty"`
// The URI of the source image. Can be either:
//
// 1. A Google Cloud Storage URI of the form
// `gs://bucket_name/object_name`. Object versioning is not supported. See
// [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris) for more
// info.
//
// 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
// HTTP/HTTPS URLs, Google cannot guarantee that the request will be
// completed. Your request may fail if the specified host denies the
// request (e.g. due to request throttling or DOS prevention), or if Google
// throttles requests to the site for abuse prevention. You should not
// depend on externally-hosted images for production applications.
//
// When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
// precedence.
ImageUri string `protobuf:"bytes,2,opt,name=image_uri,json=imageUri,proto3" json:"image_uri,omitempty"`
// contains filtered or unexported fields
}External image source (Google Cloud Storage or web URL image location).
func (*ImageSource) Descriptor
func (*ImageSource) Descriptor() ([]byte, []int)Deprecated: Use ImageSource.ProtoReflect.Descriptor instead.
func (*ImageSource) GetGcsImageUri
func (x *ImageSource) GetGcsImageUri() stringfunc (*ImageSource) GetImageUri
func (x *ImageSource) GetImageUri() stringfunc (*ImageSource) ProtoMessage
func (*ImageSource) ProtoMessage()func (*ImageSource) ProtoReflect
func (x *ImageSource) ProtoReflect() protoreflect.Messagefunc (*ImageSource) Reset
func (x *ImageSource) Reset()func (*ImageSource) String
func (x *ImageSource) String() stringImportProductSetsGcsSource
type ImportProductSetsGcsSource struct {
// The Google Cloud Storage URI of the input csv file.
//
// The URI must start with `gs://`.
//
// The format of the input csv file should be one image per line.
// In each line, there are 8 columns.
//
// 1. image-uri
// 2. image-id
// 3. product-set-id
// 4. product-id
// 5. product-category
// 6. product-display-name
// 7. labels
// 8. bounding-poly
//
// The `image-uri`, `product-set-id`, `product-id`, and `product-category`
// columns are required. All other columns are optional.
//
// If the `ProductSet` or `Product` specified by the `product-set-id` and
// `product-id` values does not exist, then the system will create a new
// `ProductSet` or `Product` for the image. In this case, the
// `product-display-name` column refers to
// [display_name][google.cloud.vision.v1.Product.display_name], the
// `product-category` column refers to
// [product_category][google.cloud.vision.v1.Product.product_category], and
// the `labels` column refers to
// [product_labels][google.cloud.vision.v1.Product.product_labels].
//
// The `image-id` column is optional but must be unique if provided. If it is
// empty, the system will automatically assign a unique id to the image.
//
// The `product-display-name` column is optional. If it is empty, the system
// sets the [display_name][google.cloud.vision.v1.Product.display_name] field
// for the product to a space (" "). You can update the `display_name` later
// by using the API.
//
// If a `Product` with the specified `product-id` already exists, then the
// system ignores the `product-display-name`, `product-category`, and `labels`
// columns.
//
// The `labels` column (optional) is a line containing a list of
// comma-separated key-value pairs, in the following format:
//
// "key_1=value_1,key_2=value_2,...,key_n=value_n"
//
// The `bounding-poly` column (optional) identifies one region of
// interest from the image in the same manner as `CreateReferenceImage`. If
// you do not specify the `bounding-poly` column, then the system will try to
// detect regions of interest automatically.
//
// At most one `bounding-poly` column is allowed per line. If the image
// contains multiple regions of interest, add a line to the CSV file that
// includes the same product information, and the `bounding-poly` values for
// each region of interest.
//
// The `bounding-poly` column must contain an even number of comma-separated
// numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
// non-negative integers for absolute bounding polygons, and float values
// in [0, 1] for normalized bounding polygons.
//
// The system will resize the image if the image resolution is too
// large to process (larger than 20MP).
CsvFileUri string `protobuf:"bytes,1,opt,name=csv_file_uri,json=csvFileUri,proto3" json:"csv_file_uri,omitempty"`
// contains filtered or unexported fields
}The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line.
func (*ImportProductSetsGcsSource) Descriptor
func (*ImportProductSetsGcsSource) Descriptor() ([]byte, []int)Deprecated: Use ImportProductSetsGcsSource.ProtoReflect.Descriptor instead.
func (*ImportProductSetsGcsSource) GetCsvFileUri
func (x *ImportProductSetsGcsSource) GetCsvFileUri() stringfunc (*ImportProductSetsGcsSource) ProtoMessage
func (*ImportProductSetsGcsSource) ProtoMessage()func (*ImportProductSetsGcsSource) ProtoReflect
func (x *ImportProductSetsGcsSource) ProtoReflect() protoreflect.Messagefunc (*ImportProductSetsGcsSource) Reset
func (x *ImportProductSetsGcsSource) Reset()func (*ImportProductSetsGcsSource) String
func (x *ImportProductSetsGcsSource) String() stringImportProductSetsInputConfig
type ImportProductSetsInputConfig struct {
// The source of the input.
//
// Types that are assignable to Source:
//
// *ImportProductSetsInputConfig_GcsSource
Source isImportProductSetsInputConfig_Source `protobuf_oneof:"source"`
// contains filtered or unexported fields
}The input content for the ImportProductSets method.
func (*ImportProductSetsInputConfig) Descriptor
func (*ImportProductSetsInputConfig) Descriptor() ([]byte, []int)Deprecated: Use ImportProductSetsInputConfig.ProtoReflect.Descriptor instead.
func (*ImportProductSetsInputConfig) GetGcsSource
func (x *ImportProductSetsInputConfig) GetGcsSource() *ImportProductSetsGcsSourcefunc (*ImportProductSetsInputConfig) GetSource
func (m *ImportProductSetsInputConfig) GetSource() isImportProductSetsInputConfig_Sourcefunc (*ImportProductSetsInputConfig) ProtoMessage
func (*ImportProductSetsInputConfig) ProtoMessage()func (*ImportProductSetsInputConfig) ProtoReflect
func (x *ImportProductSetsInputConfig) ProtoReflect() protoreflect.Messagefunc (*ImportProductSetsInputConfig) Reset
func (x *ImportProductSetsInputConfig) Reset()func (*ImportProductSetsInputConfig) String
func (x *ImportProductSetsInputConfig) String() stringImportProductSetsInputConfig_GcsSource
type ImportProductSetsInputConfig_GcsSource struct {
// The Google Cloud Storage location for a csv file which preserves a list
// of ImportProductSetRequests in each line.
GcsSource *ImportProductSetsGcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"`
}ImportProductSetsRequest
type ImportProductSetsRequest struct {
// Required. The project in which the ProductSets should be imported.
//
// Format is `projects/PROJECT_ID/locations/LOC_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The input content for the list of requests.
InputConfig *ImportProductSetsInputConfig `protobuf:"bytes,2,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"`
// contains filtered or unexported fields
}Request message for the ImportProductSets method.
func (*ImportProductSetsRequest) Descriptor
func (*ImportProductSetsRequest) Descriptor() ([]byte, []int)Deprecated: Use ImportProductSetsRequest.ProtoReflect.Descriptor instead.
func (*ImportProductSetsRequest) GetInputConfig
func (x *ImportProductSetsRequest) GetInputConfig() *ImportProductSetsInputConfigfunc (*ImportProductSetsRequest) GetParent
func (x *ImportProductSetsRequest) GetParent() stringfunc (*ImportProductSetsRequest) ProtoMessage
func (*ImportProductSetsRequest) ProtoMessage()func (*ImportProductSetsRequest) ProtoReflect
func (x *ImportProductSetsRequest) ProtoReflect() protoreflect.Messagefunc (*ImportProductSetsRequest) Reset
func (x *ImportProductSetsRequest) Reset()func (*ImportProductSetsRequest) String
func (x *ImportProductSetsRequest) String() stringImportProductSetsResponse
type ImportProductSetsResponse struct {
// The list of reference_images that are imported successfully.
ReferenceImages []*ReferenceImage `protobuf:"bytes,1,rep,name=reference_images,json=referenceImages,proto3" json:"reference_images,omitempty"`
// The rpc status for each ImportProductSet request, including both successes
// and errors.
//
// The number of statuses here matches the number of lines in the csv file,
// and statuses[i] stores the success or failure status of processing the i-th
// line of the csv, starting from line 0.
Statuses []*status.Status `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"`
// contains filtered or unexported fields
}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.
func (*ImportProductSetsResponse) Descriptor
func (*ImportProductSetsResponse) Descriptor() ([]byte, []int)Deprecated: Use ImportProductSetsResponse.ProtoReflect.Descriptor instead.
func (*ImportProductSetsResponse) GetReferenceImages
func (x *ImportProductSetsResponse) GetReferenceImages() []*ReferenceImagefunc (*ImportProductSetsResponse) GetStatuses
func (x *ImportProductSetsResponse) GetStatuses() []*status.Statusfunc (*ImportProductSetsResponse) ProtoMessage
func (*ImportProductSetsResponse) ProtoMessage()func (*ImportProductSetsResponse) ProtoReflect
func (x *ImportProductSetsResponse) ProtoReflect() protoreflect.Messagefunc (*ImportProductSetsResponse) Reset
func (x *ImportProductSetsResponse) Reset()func (*ImportProductSetsResponse) String
func (x *ImportProductSetsResponse) String() stringInputConfig
type InputConfig struct {
// The Google Cloud Storage location to read the input from.
GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3" json:"gcs_source,omitempty"`
// File content, represented as a stream of bytes.
// Note: As with all `bytes` fields, protobuffers use a pure binary
// representation, whereas JSON representations use base64.
//
// Currently, this field only works for BatchAnnotateFiles requests. It does
// not work for AsyncBatchAnnotateFiles requests.
Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
// The type of the file. Currently only "application/pdf", "image/tiff" and
// "image/gif" are supported. Wildcards are not supported.
MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// contains filtered or unexported fields
}The desired input location and metadata.
func (*InputConfig) Descriptor
func (*InputConfig) Descriptor() ([]byte, []int)Deprecated: Use InputConfig.ProtoReflect.Descriptor instead.
func (*InputConfig) GetContent
func (x *InputConfig) GetContent() []bytefunc (*InputConfig) GetGcsSource
func (x *InputConfig) GetGcsSource() *GcsSourcefunc (*InputConfig) GetMimeType
func (x *InputConfig) GetMimeType() stringfunc (*InputConfig) ProtoMessage
func (*InputConfig) ProtoMessage()func (*InputConfig) ProtoReflect
func (x *InputConfig) ProtoReflect() protoreflect.Messagefunc (*InputConfig) Reset
func (x *InputConfig) Reset()func (*InputConfig) String
func (x *InputConfig) String() stringLatLongRect
type LatLongRect struct {
// Min lat/long pair.
MinLatLng *latlng.LatLng `protobuf:"bytes,1,opt,name=min_lat_lng,json=minLatLng,proto3" json:"min_lat_lng,omitempty"`
// Max lat/long pair.
MaxLatLng *latlng.LatLng `protobuf:"bytes,2,opt,name=max_lat_lng,json=maxLatLng,proto3" json:"max_lat_lng,omitempty"`
// contains filtered or unexported fields
}Rectangle determined by min and max LatLng pairs.
func (*LatLongRect) Descriptor
func (*LatLongRect) Descriptor() ([]byte, []int)Deprecated: Use LatLongRect.ProtoReflect.Descriptor instead.
func (*LatLongRect) GetMaxLatLng
func (x *LatLongRect) GetMaxLatLng() *latlng.LatLngfunc (*LatLongRect) GetMinLatLng
func (x *LatLongRect) GetMinLatLng() *latlng.LatLngfunc (*LatLongRect) ProtoMessage
func (*LatLongRect) ProtoMessage()func (*LatLongRect) ProtoReflect
func (x *LatLongRect) ProtoReflect() protoreflect.Messagefunc (*LatLongRect) Reset
func (x *LatLongRect) Reset()func (*LatLongRect) String
func (x *LatLongRect) String() stringLikelihood
type Likelihood int32A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades.
Likelihood_UNKNOWN, Likelihood_VERY_UNLIKELY, Likelihood_UNLIKELY, Likelihood_POSSIBLE, Likelihood_LIKELY, Likelihood_VERY_LIKELY
const (
// Unknown likelihood.
Likelihood_UNKNOWN Likelihood = 0
// It is very unlikely.
Likelihood_VERY_UNLIKELY Likelihood = 1
// It is unlikely.
Likelihood_UNLIKELY Likelihood = 2
// It is possible.
Likelihood_POSSIBLE Likelihood = 3
// It is likely.
Likelihood_LIKELY Likelihood = 4
// It is very likely.
Likelihood_VERY_LIKELY Likelihood = 5
)func (Likelihood) Descriptor
func (Likelihood) Descriptor() protoreflect.EnumDescriptorfunc (Likelihood) Enum
func (x Likelihood) Enum() *Likelihoodfunc (Likelihood) EnumDescriptor
func (Likelihood) EnumDescriptor() ([]byte, []int)Deprecated: Use Likelihood.Descriptor instead.
func (Likelihood) Number
func (x Likelihood) Number() protoreflect.EnumNumberfunc (Likelihood) String
func (x Likelihood) String() stringfunc (Likelihood) Type
func (Likelihood) Type() protoreflect.EnumTypeListProductSetsRequest
type ListProductSetsRequest struct {
// Required. The project from which ProductSets should be listed.
//
// Format is `projects/PROJECT_ID/locations/LOC_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The maximum number of items to return. Default 10, maximum 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The next_page_token returned from a previous List request, if any.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}Request message for the ListProductSets method.
func (*ListProductSetsRequest) Descriptor
func (*ListProductSetsRequest) Descriptor() ([]byte, []int)Deprecated: Use ListProductSetsRequest.ProtoReflect.Descriptor instead.
func (*ListProductSetsRequest) GetPageSize
func (x *ListProductSetsRequest) GetPageSize() int32func (*ListProductSetsRequest) GetPageToken
func (x *ListProductSetsRequest) GetPageToken() stringfunc (*ListProductSetsRequest) GetParent
func (x *ListProductSetsRequest) GetParent() stringfunc (*ListProductSetsRequest) ProtoMessage
func (*ListProductSetsRequest) ProtoMessage()func (*ListProductSetsRequest) ProtoReflect
func (x *ListProductSetsRequest) ProtoReflect() protoreflect.Messagefunc (*ListProductSetsRequest) Reset
func (x *ListProductSetsRequest) Reset()func (*ListProductSetsRequest) String
func (x *ListProductSetsRequest) String() stringListProductSetsResponse
type ListProductSetsResponse struct {
// List of ProductSets.
ProductSets []*ProductSet `protobuf:"bytes,1,rep,name=product_sets,json=productSets,proto3" json:"product_sets,omitempty"`
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for the ListProductSets method.
func (*ListProductSetsResponse) Descriptor
func (*ListProductSetsResponse) Descriptor() ([]byte, []int)Deprecated: Use ListProductSetsResponse.ProtoReflect.Descriptor instead.
func (*ListProductSetsResponse) GetNextPageToken
func (x *ListProductSetsResponse) GetNextPageToken() stringfunc (*ListProductSetsResponse) GetProductSets
func (x *ListProductSetsResponse) GetProductSets() []*ProductSetfunc (*ListProductSetsResponse) ProtoMessage
func (*ListProductSetsResponse) ProtoMessage()func (*ListProductSetsResponse) ProtoReflect
func (x *ListProductSetsResponse) ProtoReflect() protoreflect.Messagefunc (*ListProductSetsResponse) Reset
func (x *ListProductSetsResponse) Reset()func (*ListProductSetsResponse) String
func (x *ListProductSetsResponse) String() stringListProductsInProductSetRequest
type ListProductsInProductSetRequest struct {
// Required. The ProductSet resource for which to retrieve Products.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The maximum number of items to return. Default 10, maximum 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The next_page_token returned from a previous List request, if any.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}Request message for the ListProductsInProductSet method.
func (*ListProductsInProductSetRequest) Descriptor
func (*ListProductsInProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use ListProductsInProductSetRequest.ProtoReflect.Descriptor instead.
func (*ListProductsInProductSetRequest) GetName
func (x *ListProductsInProductSetRequest) GetName() stringfunc (*ListProductsInProductSetRequest) GetPageSize
func (x *ListProductsInProductSetRequest) GetPageSize() int32func (*ListProductsInProductSetRequest) GetPageToken
func (x *ListProductsInProductSetRequest) GetPageToken() stringfunc (*ListProductsInProductSetRequest) ProtoMessage
func (*ListProductsInProductSetRequest) ProtoMessage()func (*ListProductsInProductSetRequest) ProtoReflect
func (x *ListProductsInProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*ListProductsInProductSetRequest) Reset
func (x *ListProductsInProductSetRequest) Reset()func (*ListProductsInProductSetRequest) String
func (x *ListProductsInProductSetRequest) String() stringListProductsInProductSetResponse
type ListProductsInProductSetResponse struct {
// The list of Products.
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for the ListProductsInProductSet method.
func (*ListProductsInProductSetResponse) Descriptor
func (*ListProductsInProductSetResponse) Descriptor() ([]byte, []int)Deprecated: Use ListProductsInProductSetResponse.ProtoReflect.Descriptor instead.
func (*ListProductsInProductSetResponse) GetNextPageToken
func (x *ListProductsInProductSetResponse) GetNextPageToken() stringfunc (*ListProductsInProductSetResponse) GetProducts
func (x *ListProductsInProductSetResponse) GetProducts() []*Productfunc (*ListProductsInProductSetResponse) ProtoMessage
func (*ListProductsInProductSetResponse) ProtoMessage()func (*ListProductsInProductSetResponse) ProtoReflect
func (x *ListProductsInProductSetResponse) ProtoReflect() protoreflect.Messagefunc (*ListProductsInProductSetResponse) Reset
func (x *ListProductsInProductSetResponse) Reset()func (*ListProductsInProductSetResponse) String
func (x *ListProductsInProductSetResponse) String() stringListProductsRequest
type ListProductsRequest struct {
// Required. The project OR ProductSet from which Products should be listed.
//
// Format:
// `projects/PROJECT_ID/locations/LOC_ID`
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The maximum number of items to return. Default 10, maximum 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The next_page_token returned from a previous List request, if any.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}Request message for the ListProducts method.
func (*ListProductsRequest) Descriptor
func (*ListProductsRequest) Descriptor() ([]byte, []int)Deprecated: Use ListProductsRequest.ProtoReflect.Descriptor instead.
func (*ListProductsRequest) GetPageSize
func (x *ListProductsRequest) GetPageSize() int32func (*ListProductsRequest) GetPageToken
func (x *ListProductsRequest) GetPageToken() stringfunc (*ListProductsRequest) GetParent
func (x *ListProductsRequest) GetParent() stringfunc (*ListProductsRequest) ProtoMessage
func (*ListProductsRequest) ProtoMessage()func (*ListProductsRequest) ProtoReflect
func (x *ListProductsRequest) ProtoReflect() protoreflect.Messagefunc (*ListProductsRequest) Reset
func (x *ListProductsRequest) Reset()func (*ListProductsRequest) String
func (x *ListProductsRequest) String() stringListProductsResponse
type ListProductsResponse struct {
// List of products.
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for the ListProducts method.
func (*ListProductsResponse) Descriptor
func (*ListProductsResponse) Descriptor() ([]byte, []int)Deprecated: Use ListProductsResponse.ProtoReflect.Descriptor instead.
func (*ListProductsResponse) GetNextPageToken
func (x *ListProductsResponse) GetNextPageToken() stringfunc (*ListProductsResponse) GetProducts
func (x *ListProductsResponse) GetProducts() []*Productfunc (*ListProductsResponse) ProtoMessage
func (*ListProductsResponse) ProtoMessage()func (*ListProductsResponse) ProtoReflect
func (x *ListProductsResponse) ProtoReflect() protoreflect.Messagefunc (*ListProductsResponse) Reset
func (x *ListProductsResponse) Reset()func (*ListProductsResponse) String
func (x *ListProductsResponse) String() stringListReferenceImagesRequest
type ListReferenceImagesRequest struct {
// Required. Resource name of the product containing the reference images.
//
// Format is
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The maximum number of items to return. Default 10, maximum 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// A token identifying a page of results to be returned. This is the value
// of `nextPageToken` returned in a previous reference image list request.
//
// Defaults to the first page if not specified.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}Request message for the ListReferenceImages method.
func (*ListReferenceImagesRequest) Descriptor
func (*ListReferenceImagesRequest) Descriptor() ([]byte, []int)Deprecated: Use ListReferenceImagesRequest.ProtoReflect.Descriptor instead.
func (*ListReferenceImagesRequest) GetPageSize
func (x *ListReferenceImagesRequest) GetPageSize() int32func (*ListReferenceImagesRequest) GetPageToken
func (x *ListReferenceImagesRequest) GetPageToken() stringfunc (*ListReferenceImagesRequest) GetParent
func (x *ListReferenceImagesRequest) GetParent() stringfunc (*ListReferenceImagesRequest) ProtoMessage
func (*ListReferenceImagesRequest) ProtoMessage()func (*ListReferenceImagesRequest) ProtoReflect
func (x *ListReferenceImagesRequest) ProtoReflect() protoreflect.Messagefunc (*ListReferenceImagesRequest) Reset
func (x *ListReferenceImagesRequest) Reset()func (*ListReferenceImagesRequest) String
func (x *ListReferenceImagesRequest) String() stringListReferenceImagesResponse
type ListReferenceImagesResponse struct {
// The list of reference images.
ReferenceImages []*ReferenceImage `protobuf:"bytes,1,rep,name=reference_images,json=referenceImages,proto3" json:"reference_images,omitempty"`
// The maximum number of items to return. Default 10, maximum 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The next_page_token returned from a previous List request, if any.
NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for the ListReferenceImages method.
func (*ListReferenceImagesResponse) Descriptor
func (*ListReferenceImagesResponse) Descriptor() ([]byte, []int)Deprecated: Use ListReferenceImagesResponse.ProtoReflect.Descriptor instead.
func (*ListReferenceImagesResponse) GetNextPageToken
func (x *ListReferenceImagesResponse) GetNextPageToken() stringfunc (*ListReferenceImagesResponse) GetPageSize
func (x *ListReferenceImagesResponse) GetPageSize() int32func (*ListReferenceImagesResponse) GetReferenceImages
func (x *ListReferenceImagesResponse) GetReferenceImages() []*ReferenceImagefunc (*ListReferenceImagesResponse) ProtoMessage
func (*ListReferenceImagesResponse) ProtoMessage()func (*ListReferenceImagesResponse) ProtoReflect
func (x *ListReferenceImagesResponse) ProtoReflect() protoreflect.Messagefunc (*ListReferenceImagesResponse) Reset
func (x *ListReferenceImagesResponse) Reset()func (*ListReferenceImagesResponse) String
func (x *ListReferenceImagesResponse) String() stringLocalizedObjectAnnotation
type LocalizedObjectAnnotation struct {
// Object ID that should align with EntityAnnotation mid.
Mid string `protobuf:"bytes,1,opt,name=mid,proto3" json:"mid,omitempty"`
// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Object name, expressed in its `language_code` language.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// Score of the result. Range [0, 1].
Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"`
// Image region to which this object belongs. This must be populated.
BoundingPoly *BoundingPoly `protobuf:"bytes,5,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"`
// contains filtered or unexported fields
}Set of detected objects with bounding boxes.
func (*LocalizedObjectAnnotation) Descriptor
func (*LocalizedObjectAnnotation) Descriptor() ([]byte, []int)Deprecated: Use LocalizedObjectAnnotation.ProtoReflect.Descriptor instead.
func (*LocalizedObjectAnnotation) GetBoundingPoly
func (x *LocalizedObjectAnnotation) GetBoundingPoly() *BoundingPolyfunc (*LocalizedObjectAnnotation) GetLanguageCode
func (x *LocalizedObjectAnnotation) GetLanguageCode() stringfunc (*LocalizedObjectAnnotation) GetMid
func (x *LocalizedObjectAnnotation) GetMid() stringfunc (*LocalizedObjectAnnotation) GetName
func (x *LocalizedObjectAnnotation) GetName() stringfunc (*LocalizedObjectAnnotation) GetScore
func (x *LocalizedObjectAnnotation) GetScore() float32func (*LocalizedObjectAnnotation) ProtoMessage
func (*LocalizedObjectAnnotation) ProtoMessage()func (*LocalizedObjectAnnotation) ProtoReflect
func (x *LocalizedObjectAnnotation) ProtoReflect() protoreflect.Messagefunc (*LocalizedObjectAnnotation) Reset
func (x *LocalizedObjectAnnotation) Reset()func (*LocalizedObjectAnnotation) String
func (x *LocalizedObjectAnnotation) String() stringLocationInfo
type LocationInfo struct {
// lat/long location coordinates.
LatLng *latlng.LatLng `protobuf:"bytes,1,opt,name=lat_lng,json=latLng,proto3" json:"lat_lng,omitempty"`
// contains filtered or unexported fields
}Detected entity location information.
func (*LocationInfo) Descriptor
func (*LocationInfo) Descriptor() ([]byte, []int)Deprecated: Use LocationInfo.ProtoReflect.Descriptor instead.
func (*LocationInfo) GetLatLng
func (x *LocationInfo) GetLatLng() *latlng.LatLngfunc (*LocationInfo) ProtoMessage
func (*LocationInfo) ProtoMessage()func (*LocationInfo) ProtoReflect
func (x *LocationInfo) ProtoReflect() protoreflect.Messagefunc (*LocationInfo) Reset
func (x *LocationInfo) Reset()func (*LocationInfo) String
func (x *LocationInfo) String() stringNormalizedVertex
type NormalizedVertex struct {
// X coordinate.
X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
// contains filtered or unexported fields
}A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
func (*NormalizedVertex) Descriptor
func (*NormalizedVertex) Descriptor() ([]byte, []int)Deprecated: Use NormalizedVertex.ProtoReflect.Descriptor instead.
func (*NormalizedVertex) GetX
func (x *NormalizedVertex) GetX() float32func (*NormalizedVertex) GetY
func (x *NormalizedVertex) GetY() float32func (*NormalizedVertex) ProtoMessage
func (*NormalizedVertex) ProtoMessage()func (*NormalizedVertex) ProtoReflect
func (x *NormalizedVertex) ProtoReflect() protoreflect.Messagefunc (*NormalizedVertex) Reset
func (x *NormalizedVertex) Reset()func (*NormalizedVertex) String
func (x *NormalizedVertex) String() stringOperationMetadata
type OperationMetadata struct {
// Current state of the batch operation.
State OperationMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.vision.v1.OperationMetadata_State" json:"state,omitempty"`
// The time when the batch request was received.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The time when the operation result was last updated.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// contains filtered or unexported fields
}Contains metadata for the BatchAnnotateImages operation.
func (*OperationMetadata) Descriptor
func (*OperationMetadata) Descriptor() ([]byte, []int)Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead.
func (*OperationMetadata) GetCreateTime
func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestampfunc (*OperationMetadata) GetState
func (x *OperationMetadata) GetState() OperationMetadata_Statefunc (*OperationMetadata) GetUpdateTime
func (x *OperationMetadata) GetUpdateTime() *timestamppb.Timestampfunc (*OperationMetadata) ProtoMessage
func (*OperationMetadata) ProtoMessage()func (*OperationMetadata) ProtoReflect
func (x *OperationMetadata) ProtoReflect() protoreflect.Messagefunc (*OperationMetadata) Reset
func (x *OperationMetadata) Reset()func (*OperationMetadata) String
func (x *OperationMetadata) String() stringOperationMetadata_State
type OperationMetadata_State int32Batch operation states.
OperationMetadata_STATE_UNSPECIFIED, OperationMetadata_CREATED, OperationMetadata_RUNNING, OperationMetadata_DONE, OperationMetadata_CANCELLED
const (
// Invalid.
OperationMetadata_STATE_UNSPECIFIED OperationMetadata_State = 0
// Request is received.
OperationMetadata_CREATED OperationMetadata_State = 1
// Request is actively being processed.
OperationMetadata_RUNNING OperationMetadata_State = 2
// The batch processing is done.
OperationMetadata_DONE OperationMetadata_State = 3
// The batch processing was cancelled.
OperationMetadata_CANCELLED OperationMetadata_State = 4
)func (OperationMetadata_State) Descriptor
func (OperationMetadata_State) Descriptor() protoreflect.EnumDescriptorfunc (OperationMetadata_State) Enum
func (x OperationMetadata_State) Enum() *OperationMetadata_Statefunc (OperationMetadata_State) EnumDescriptor
func (OperationMetadata_State) EnumDescriptor() ([]byte, []int)Deprecated: Use OperationMetadata_State.Descriptor instead.
func (OperationMetadata_State) Number
func (x OperationMetadata_State) Number() protoreflect.EnumNumberfunc (OperationMetadata_State) String
func (x OperationMetadata_State) String() stringfunc (OperationMetadata_State) Type
func (OperationMetadata_State) Type() protoreflect.EnumTypeOutputConfig
type OutputConfig struct {
// The Google Cloud Storage location to write the output(s) to.
GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3" json:"gcs_destination,omitempty"`
// The max number of response protos to put into each output JSON file on
// Google Cloud Storage.
// The valid range is [1, 100]. If not specified, the default value is 20.
//
// For example, for one pdf file with 100 pages, 100 response protos will
// be generated. If `batch_size` = 20, then 5 json files each
// containing 20 response protos will be written under the prefix
// `gcs_destination`.`uri`.
//
// Currently, batch_size only applies to GcsDestination, with potential future
// support for other output configurations.
BatchSize int32 `protobuf:"varint,2,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
// contains filtered or unexported fields
}The desired output location and metadata.
func (*OutputConfig) Descriptor
func (*OutputConfig) Descriptor() ([]byte, []int)Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead.
func (*OutputConfig) GetBatchSize
func (x *OutputConfig) GetBatchSize() int32func (*OutputConfig) GetGcsDestination
func (x *OutputConfig) GetGcsDestination() *GcsDestinationfunc (*OutputConfig) ProtoMessage
func (*OutputConfig) ProtoMessage()func (*OutputConfig) ProtoReflect
func (x *OutputConfig) ProtoReflect() protoreflect.Messagefunc (*OutputConfig) Reset
func (x *OutputConfig) Reset()func (*OutputConfig) String
func (x *OutputConfig) String() stringPage
type Page struct {
// Additional information detected on the page.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// Page width. For PDFs the unit is points. For images (including
// TIFFs) the unit is pixels.
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
// Page height. For PDFs the unit is points. For images (including
// TIFFs) the unit is pixels.
Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
// List of blocks of text, images etc on this page.
Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"`
// Confidence of the OCR results on the page. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
// contains filtered or unexported fields
}Detected page from OCR.
func (*Page) Descriptor
Deprecated: Use Page.ProtoReflect.Descriptor instead.
func (*Page) GetBlocks
func (*Page) GetConfidence
func (*Page) GetHeight
func (*Page) GetProperty
func (x *Page) GetProperty() *TextAnnotation_TextPropertyfunc (*Page) GetWidth
func (*Page) ProtoMessage
func (*Page) ProtoMessage()func (*Page) ProtoReflect
func (x *Page) ProtoReflect() protoreflect.Messagefunc (*Page) Reset
func (x *Page) Reset()func (*Page) String
Paragraph
type Paragraph struct {
// Additional information detected for the paragraph.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The bounding box for the paragraph.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// - when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// - when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertex order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
// List of all words in this paragraph.
Words []*Word `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"`
// Confidence of the OCR results for the paragraph. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
// contains filtered or unexported fields
}Structural unit of text representing a number of words in certain order.
func (*Paragraph) Descriptor
Deprecated: Use Paragraph.ProtoReflect.Descriptor instead.
func (*Paragraph) GetBoundingBox
func (x *Paragraph) GetBoundingBox() *BoundingPolyfunc (*Paragraph) GetConfidence
func (*Paragraph) GetProperty
func (x *Paragraph) GetProperty() *TextAnnotation_TextPropertyfunc (*Paragraph) GetWords
func (*Paragraph) ProtoMessage
func (*Paragraph) ProtoMessage()func (*Paragraph) ProtoReflect
func (x *Paragraph) ProtoReflect() protoreflect.Messagefunc (*Paragraph) Reset
func (x *Paragraph) Reset()func (*Paragraph) String
Position
type Position struct {
// X coordinate.
X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
// Z coordinate (or depth).
Z float32 `protobuf:"fixed32,3,opt,name=z,proto3" json:"z,omitempty"`
// contains filtered or unexported fields
}A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
func (*Position) Descriptor
Deprecated: Use Position.ProtoReflect.Descriptor instead.
func (*Position) GetX
func (*Position) GetY
func (*Position) GetZ
func (*Position) ProtoMessage
func (*Position) ProtoMessage()func (*Position) ProtoReflect
func (x *Position) ProtoReflect() protoreflect.Messagefunc (*Position) Reset
func (x *Position) Reset()func (*Position) String
Product
type Product struct {
// The resource name of the product.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
//
// This field is ignored when creating a product.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The user-provided name for this Product. Must not be empty. Must be at most
// 4096 characters long.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// User-provided metadata to be stored with this product. Must be at most 4096
// characters long.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Immutable. The category for the product identified by the reference image.
// This should be one of "homegoods-v2", "apparel-v2", "toys-v2",
// "packagedgoods-v1" or "general-v1". The legacy categories "homegoods",
// "apparel", and "toys" are still supported, but these should not be used for
// new products.
ProductCategory string `protobuf:"bytes,4,opt,name=product_category,json=productCategory,proto3" json:"product_category,omitempty"`
// Key-value pairs that can be attached to a product. At query time,
// constraints can be specified based on the product_labels.
//
// Note that integer values can be provided as strings, e.g. "1199". Only
// strings with integer values can match a range-based restriction which is
// to be supported soon.
//
// Multiple values can be assigned to the same key. One product may have up to
// 500 product_labels.
//
// Notice that the total number of distinct product_labels over all products
// in one ProductSet cannot exceed 1M, otherwise the product search pipeline
// will refuse to work for that ProductSet.
ProductLabels []*Product_KeyValue `protobuf:"bytes,5,rep,name=product_labels,json=productLabels,proto3" json:"product_labels,omitempty"`
// contains filtered or unexported fields
}A Product contains ReferenceImages.
func (*Product) Descriptor
Deprecated: Use Product.ProtoReflect.Descriptor instead.
func (*Product) GetDescription
func (*Product) GetDisplayName
func (*Product) GetName
func (*Product) GetProductCategory
func (*Product) GetProductLabels
func (x *Product) GetProductLabels() []*Product_KeyValuefunc (*Product) ProtoMessage
func (*Product) ProtoMessage()func (*Product) ProtoReflect
func (x *Product) ProtoReflect() protoreflect.Messagefunc (*Product) Reset
func (x *Product) Reset()func (*Product) String
ProductSearchClient
type ProductSearchClient interface {
// Creates and returns a new ProductSet resource.
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if display_name is missing, or is longer than
// 4096 characters.
CreateProductSet(ctx context.Context, in *CreateProductSetRequest, opts ...grpc.CallOption) (*ProductSet, error)
// Lists ProductSets in an unspecified order.
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if page_size is greater than 100, or less
// than 1.
ListProductSets(ctx context.Context, in *ListProductSetsRequest, opts ...grpc.CallOption) (*ListProductSetsResponse, error)
// Gets information associated with a ProductSet.
//
// Possible errors:
//
// * Returns NOT_FOUND if the ProductSet does not exist.
GetProductSet(ctx context.Context, in *GetProductSetRequest, opts ...grpc.CallOption) (*ProductSet, error)
// Makes changes to a ProductSet resource.
// Only display_name can be updated currently.
//
// Possible errors:
//
// - Returns NOT_FOUND if the ProductSet does not exist.
// - Returns INVALID_ARGUMENT if display_name is present in update_mask but
// missing from the request or longer than 4096 characters.
UpdateProductSet(ctx context.Context, in *UpdateProductSetRequest, opts ...grpc.CallOption) (*ProductSet, error)
// Permanently deletes a ProductSet. Products and ReferenceImages in the
// ProductSet are not deleted.
//
// The actual image files are not deleted from Google Cloud Storage.
DeleteProductSet(ctx context.Context, in *DeleteProductSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Creates and returns a new product resource.
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
// characters.
// - Returns INVALID_ARGUMENT if description is longer than 4096 characters.
// - Returns INVALID_ARGUMENT if product_category is missing or invalid.
CreateProduct(ctx context.Context, in *CreateProductRequest, opts ...grpc.CallOption) (*Product, error)
// Lists products in an unspecified order.
//
// Possible errors:
//
// * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
ListProducts(ctx context.Context, in *ListProductsRequest, opts ...grpc.CallOption) (*ListProductsResponse, error)
// Gets information associated with a Product.
//
// Possible errors:
//
// * Returns NOT_FOUND if the Product does not exist.
GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error)
// Makes changes to a Product resource.
// Only the `display_name`, `description`, and `labels` fields can be updated
// right now.
//
// If labels are updated, the change will not be reflected in queries until
// the next index time.
//
// Possible errors:
//
// - Returns NOT_FOUND if the Product does not exist.
// - Returns INVALID_ARGUMENT if display_name is present in update_mask but is
// missing from the request or longer than 4096 characters.
// - Returns INVALID_ARGUMENT if description is present in update_mask but is
// longer than 4096 characters.
// - Returns INVALID_ARGUMENT if product_category is present in update_mask.
UpdateProduct(ctx context.Context, in *UpdateProductRequest, opts ...grpc.CallOption) (*Product, error)
// Permanently deletes a product and its reference images.
//
// Metadata of the product and all its images will be deleted right away, but
// search queries against ProductSets containing the product may still work
// until all related caches are refreshed.
DeleteProduct(ctx context.Context, in *DeleteProductRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Creates and returns a new ReferenceImage resource.
//
// The `bounding_poly` field is optional. If `bounding_poly` is not specified,
// the system will try to detect regions of interest in the image that are
// compatible with the product_category on the parent product. If it is
// specified, detection is ALWAYS skipped. The system converts polygons into
// non-rotated rectangles.
//
// Note that the pipeline will resize the image if the image resolution is too
// large to process (above 50MP).
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
// characters.
// - Returns INVALID_ARGUMENT if the product does not exist.
// - Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
// compatible with the parent product's product_category is detected.
// - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
CreateReferenceImage(ctx context.Context, in *CreateReferenceImageRequest, opts ...grpc.CallOption) (*ReferenceImage, error)
// Permanently deletes a reference image.
//
// The image metadata will be deleted right away, but search queries
// against ProductSets containing the image may still work until all related
// caches are refreshed.
//
// The actual image files are not deleted from Google Cloud Storage.
DeleteReferenceImage(ctx context.Context, in *DeleteReferenceImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Lists reference images.
//
// Possible errors:
//
// - Returns NOT_FOUND if the parent product does not exist.
// - Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
// than 1.
ListReferenceImages(ctx context.Context, in *ListReferenceImagesRequest, opts ...grpc.CallOption) (*ListReferenceImagesResponse, error)
// Gets information associated with a ReferenceImage.
//
// Possible errors:
//
// * Returns NOT_FOUND if the specified image does not exist.
GetReferenceImage(ctx context.Context, in *GetReferenceImageRequest, opts ...grpc.CallOption) (*ReferenceImage, error)
// Adds a Product to the specified ProductSet. If the Product is already
// present, no change is made.
//
// One Product can be added to at most 100 ProductSets.
//
// Possible errors:
//
// * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
AddProductToProductSet(ctx context.Context, in *AddProductToProductSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Removes a Product from the specified ProductSet.
RemoveProductFromProductSet(ctx context.Context, in *RemoveProductFromProductSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Lists the Products in a ProductSet, in an unspecified order. If the
// ProductSet does not exist, the products field of the response will be
// empty.
//
// Possible errors:
//
// * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
ListProductsInProductSet(ctx context.Context, in *ListProductsInProductSetRequest, opts ...grpc.CallOption) (*ListProductsInProductSetResponse, error)
// Asynchronous API that imports a list of reference images to specified
// product sets based on a list of image information.
//
// The [google.longrunning.Operation][google.longrunning.Operation] API can be
// used to keep track of the progress and results of the request.
// `Operation.metadata` contains `BatchOperationMetadata`. (progress)
// `Operation.response` contains `ImportProductSetsResponse`. (results)
//
// The input source of this method is a csv file on Google Cloud Storage.
// For the format of the csv file please see
// [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
ImportProductSets(ctx context.Context, in *ImportProductSetsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Asynchronous API to delete all Products in a ProductSet or all Products
// that are in no ProductSet.
//
// If a Product is a member of the specified ProductSet in addition to other
// ProductSets, the Product will still be deleted.
//
// It is recommended to not delete the specified ProductSet until after this
// operation has completed. It is also recommended to not add any of the
// Products involved in the batch delete to a new ProductSet while this
// operation is running because those Products may still end up deleted.
//
// It's not possible to undo the PurgeProducts operation. Therefore, it is
// recommended to keep the csv files used in ImportProductSets (if that was
// how you originally built the Product Set) before starting PurgeProducts, in
// case you need to re-import the data after deletion.
//
// If the plan is to purge all of the Products from a ProductSet and then
// re-use the empty ProductSet to re-import new Products into the empty
// ProductSet, you must wait until the PurgeProducts operation has finished
// for that ProductSet.
//
// The [google.longrunning.Operation][google.longrunning.Operation] API can be
// used to keep track of the progress and results of the request.
// `Operation.metadata` contains `BatchOperationMetadata`. (progress)
PurgeProducts(ctx context.Context, in *PurgeProductsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
}ProductSearchClient is the client API for ProductSearch service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewProductSearchClient
func NewProductSearchClient(cc grpc.ClientConnInterface) ProductSearchClientProductSearchParams
type ProductSearchParams struct {
// The bounding polygon around the area of interest in the image.
// If it is not specified, system discretion will be applied.
BoundingPoly *BoundingPoly `protobuf:"bytes,9,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"`
// 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`.
ProductSet string `protobuf:"bytes,6,opt,name=product_set,json=productSet,proto3" json:"product_set,omitempty"`
// The list of product categories to search in. Currently, we only consider
// the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
// "packagedgoods-v1", or "general-v1" should be specified. The legacy
// categories "homegoods", "apparel", and "toys" are still supported but will
// be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
// or "toys-v2" for better product search accuracy. It is recommended to
// migrate existing products to these categories as well.
ProductCategories []string `protobuf:"bytes,7,rep,name=product_categories,json=productCategories,proto3" json:"product_categories,omitempty"`
// The filtering expression. This can be used to restrict search results based
// on Product labels. We currently support an AND of OR of key-value
// expressions, where each expression within an OR must have the same key. An
// '=' should be used to connect the key and value.
//
// For example, "(color = red OR color = blue) AND brand = Google" is
// acceptable, but "(color = red OR brand = Google)" is not acceptable.
// "color: red" is not acceptable because it uses a ':' instead of an '='.
Filter string `protobuf:"bytes,8,opt,name=filter,proto3" json:"filter,omitempty"`
// contains filtered or unexported fields
}Parameters for a product search request.
func (*ProductSearchParams) Descriptor
func (*ProductSearchParams) Descriptor() ([]byte, []int)Deprecated: Use ProductSearchParams.ProtoReflect.Descriptor instead.
func (*ProductSearchParams) GetBoundingPoly
func (x *ProductSearchParams) GetBoundingPoly() *BoundingPolyfunc (*ProductSearchParams) GetFilter
func (x *ProductSearchParams) GetFilter() stringfunc (*ProductSearchParams) GetProductCategories
func (x *ProductSearchParams) GetProductCategories() []stringfunc (*ProductSearchParams) GetProductSet
func (x *ProductSearchParams) GetProductSet() stringfunc (*ProductSearchParams) ProtoMessage
func (*ProductSearchParams) ProtoMessage()func (*ProductSearchParams) ProtoReflect
func (x *ProductSearchParams) ProtoReflect() protoreflect.Messagefunc (*ProductSearchParams) Reset
func (x *ProductSearchParams) Reset()func (*ProductSearchParams) String
func (x *ProductSearchParams) String() stringProductSearchResults
type ProductSearchResults struct {
// Timestamp of the index which provided these results. Products added to the
// product set and products removed from the product set after this time are
// not reflected in the current results.
IndexTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=index_time,json=indexTime,proto3" json:"index_time,omitempty"`
// List of results, one for each product match.
Results []*ProductSearchResults_Result `protobuf:"bytes,5,rep,name=results,proto3" json:"results,omitempty"`
// List of results grouped by products detected in the query image. Each entry
// corresponds to one bounding polygon in the query image, and contains the
// matching products specific to that region. There may be duplicate product
// matches in the union of all the per-product results.
ProductGroupedResults []*ProductSearchResults_GroupedResult `protobuf:"bytes,6,rep,name=product_grouped_results,json=productGroupedResults,proto3" json:"product_grouped_results,omitempty"`
// contains filtered or unexported fields
}Results for a product search request.
func (*ProductSearchResults) Descriptor
func (*ProductSearchResults) Descriptor() ([]byte, []int)Deprecated: Use ProductSearchResults.ProtoReflect.Descriptor instead.
func (*ProductSearchResults) GetIndexTime
func (x *ProductSearchResults) GetIndexTime() *timestamppb.Timestampfunc (*ProductSearchResults) GetProductGroupedResults
func (x *ProductSearchResults) GetProductGroupedResults() []*ProductSearchResults_GroupedResultfunc (*ProductSearchResults) GetResults
func (x *ProductSearchResults) GetResults() []*ProductSearchResults_Resultfunc (*ProductSearchResults) ProtoMessage
func (*ProductSearchResults) ProtoMessage()func (*ProductSearchResults) ProtoReflect
func (x *ProductSearchResults) ProtoReflect() protoreflect.Messagefunc (*ProductSearchResults) Reset
func (x *ProductSearchResults) Reset()func (*ProductSearchResults) String
func (x *ProductSearchResults) String() stringProductSearchResults_GroupedResult
type ProductSearchResults_GroupedResult struct {
// The bounding polygon around the product detected in the query image.
BoundingPoly *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"`
// List of results, one for each product match.
Results []*ProductSearchResults_Result `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
// List of generic predictions for the object in the bounding box.
ObjectAnnotations []*ProductSearchResults_ObjectAnnotation `protobuf:"bytes,3,rep,name=object_annotations,json=objectAnnotations,proto3" json:"object_annotations,omitempty"`
// contains filtered or unexported fields
}Information about the products similar to a single product in a query image.
func (*ProductSearchResults_GroupedResult) Descriptor
func (*ProductSearchResults_GroupedResult) Descriptor() ([]byte, []int)Deprecated: Use ProductSearchResults_GroupedResult.ProtoReflect.Descriptor instead.
func (*ProductSearchResults_GroupedResult) GetBoundingPoly
func (x *ProductSearchResults_GroupedResult) GetBoundingPoly() *BoundingPolyfunc (*ProductSearchResults_GroupedResult) GetObjectAnnotations
func (x *ProductSearchResults_GroupedResult) GetObjectAnnotations() []*ProductSearchResults_ObjectAnnotationfunc (*ProductSearchResults_GroupedResult) GetResults
func (x *ProductSearchResults_GroupedResult) GetResults() []*ProductSearchResults_Resultfunc (*ProductSearchResults_GroupedResult) ProtoMessage
func (*ProductSearchResults_GroupedResult) ProtoMessage()func (*ProductSearchResults_GroupedResult) ProtoReflect
func (x *ProductSearchResults_GroupedResult) ProtoReflect() protoreflect.Messagefunc (*ProductSearchResults_GroupedResult) Reset
func (x *ProductSearchResults_GroupedResult) Reset()func (*ProductSearchResults_GroupedResult) String
func (x *ProductSearchResults_GroupedResult) String() stringProductSearchResults_ObjectAnnotation
type ProductSearchResults_ObjectAnnotation struct {
// Object ID that should align with EntityAnnotation mid.
Mid string `protobuf:"bytes,1,opt,name=mid,proto3" json:"mid,omitempty"`
// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Object name, expressed in its `language_code` language.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// Score of the result. Range [0, 1].
Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"`
// contains filtered or unexported fields
}Prediction for what the object in the bounding box is.
func (*ProductSearchResults_ObjectAnnotation) Descriptor
func (*ProductSearchResults_ObjectAnnotation) Descriptor() ([]byte, []int)Deprecated: Use ProductSearchResults_ObjectAnnotation.ProtoReflect.Descriptor instead.
func (*ProductSearchResults_ObjectAnnotation) GetLanguageCode
func (x *ProductSearchResults_ObjectAnnotation) GetLanguageCode() stringfunc (*ProductSearchResults_ObjectAnnotation) GetMid
func (x *ProductSearchResults_ObjectAnnotation) GetMid() stringfunc (*ProductSearchResults_ObjectAnnotation) GetName
func (x *ProductSearchResults_ObjectAnnotation) GetName() stringfunc (*ProductSearchResults_ObjectAnnotation) GetScore
func (x *ProductSearchResults_ObjectAnnotation) GetScore() float32func (*ProductSearchResults_ObjectAnnotation) ProtoMessage
func (*ProductSearchResults_ObjectAnnotation) ProtoMessage()func (*ProductSearchResults_ObjectAnnotation) ProtoReflect
func (x *ProductSearchResults_ObjectAnnotation) ProtoReflect() protoreflect.Messagefunc (*ProductSearchResults_ObjectAnnotation) Reset
func (x *ProductSearchResults_ObjectAnnotation) Reset()func (*ProductSearchResults_ObjectAnnotation) String
func (x *ProductSearchResults_ObjectAnnotation) String() stringProductSearchResults_Result
type ProductSearchResults_Result struct {
// The Product.
Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"`
// A confidence level on the match, ranging from 0 (no confidence) to
// 1 (full confidence).
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// The resource name of the image from the product that is the closest match
// to the query.
Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
// contains filtered or unexported fields
}Information about a product.
func (*ProductSearchResults_Result) Descriptor
func (*ProductSearchResults_Result) Descriptor() ([]byte, []int)Deprecated: Use ProductSearchResults_Result.ProtoReflect.Descriptor instead.
func (*ProductSearchResults_Result) GetImage
func (x *ProductSearchResults_Result) GetImage() stringfunc (*ProductSearchResults_Result) GetProduct
func (x *ProductSearchResults_Result) GetProduct() *Productfunc (*ProductSearchResults_Result) GetScore
func (x *ProductSearchResults_Result) GetScore() float32func (*ProductSearchResults_Result) ProtoMessage
func (*ProductSearchResults_Result) ProtoMessage()func (*ProductSearchResults_Result) ProtoReflect
func (x *ProductSearchResults_Result) ProtoReflect() protoreflect.Messagefunc (*ProductSearchResults_Result) Reset
func (x *ProductSearchResults_Result) Reset()func (*ProductSearchResults_Result) String
func (x *ProductSearchResults_Result) String() stringProductSearchServer
type ProductSearchServer interface {
// Creates and returns a new ProductSet resource.
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if display_name is missing, or is longer than
// 4096 characters.
CreateProductSet(context.Context, *CreateProductSetRequest) (*ProductSet, error)
// Lists ProductSets in an unspecified order.
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if page_size is greater than 100, or less
// than 1.
ListProductSets(context.Context, *ListProductSetsRequest) (*ListProductSetsResponse, error)
// Gets information associated with a ProductSet.
//
// Possible errors:
//
// * Returns NOT_FOUND if the ProductSet does not exist.
GetProductSet(context.Context, *GetProductSetRequest) (*ProductSet, error)
// Makes changes to a ProductSet resource.
// Only display_name can be updated currently.
//
// Possible errors:
//
// - Returns NOT_FOUND if the ProductSet does not exist.
// - Returns INVALID_ARGUMENT if display_name is present in update_mask but
// missing from the request or longer than 4096 characters.
UpdateProductSet(context.Context, *UpdateProductSetRequest) (*ProductSet, error)
// Permanently deletes a ProductSet. Products and ReferenceImages in the
// ProductSet are not deleted.
//
// The actual image files are not deleted from Google Cloud Storage.
DeleteProductSet(context.Context, *DeleteProductSetRequest) (*emptypb.Empty, error)
// Creates and returns a new product resource.
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
// characters.
// - Returns INVALID_ARGUMENT if description is longer than 4096 characters.
// - Returns INVALID_ARGUMENT if product_category is missing or invalid.
CreateProduct(context.Context, *CreateProductRequest) (*Product, error)
// Lists products in an unspecified order.
//
// Possible errors:
//
// * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)
// Gets information associated with a Product.
//
// Possible errors:
//
// * Returns NOT_FOUND if the Product does not exist.
GetProduct(context.Context, *GetProductRequest) (*Product, error)
// Makes changes to a Product resource.
// Only the `display_name`, `description`, and `labels` fields can be updated
// right now.
//
// If labels are updated, the change will not be reflected in queries until
// the next index time.
//
// Possible errors:
//
// - Returns NOT_FOUND if the Product does not exist.
// - Returns INVALID_ARGUMENT if display_name is present in update_mask but is
// missing from the request or longer than 4096 characters.
// - Returns INVALID_ARGUMENT if description is present in update_mask but is
// longer than 4096 characters.
// - Returns INVALID_ARGUMENT if product_category is present in update_mask.
UpdateProduct(context.Context, *UpdateProductRequest) (*Product, error)
// Permanently deletes a product and its reference images.
//
// Metadata of the product and all its images will be deleted right away, but
// search queries against ProductSets containing the product may still work
// until all related caches are refreshed.
DeleteProduct(context.Context, *DeleteProductRequest) (*emptypb.Empty, error)
// Creates and returns a new ReferenceImage resource.
//
// The `bounding_poly` field is optional. If `bounding_poly` is not specified,
// the system will try to detect regions of interest in the image that are
// compatible with the product_category on the parent product. If it is
// specified, detection is ALWAYS skipped. The system converts polygons into
// non-rotated rectangles.
//
// Note that the pipeline will resize the image if the image resolution is too
// large to process (above 50MP).
//
// Possible errors:
//
// - Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
// characters.
// - Returns INVALID_ARGUMENT if the product does not exist.
// - Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
// compatible with the parent product's product_category is detected.
// - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
CreateReferenceImage(context.Context, *CreateReferenceImageRequest) (*ReferenceImage, error)
// Permanently deletes a reference image.
//
// The image metadata will be deleted right away, but search queries
// against ProductSets containing the image may still work until all related
// caches are refreshed.
//
// The actual image files are not deleted from Google Cloud Storage.
DeleteReferenceImage(context.Context, *DeleteReferenceImageRequest) (*emptypb.Empty, error)
// Lists reference images.
//
// Possible errors:
//
// - Returns NOT_FOUND if the parent product does not exist.
// - Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
// than 1.
ListReferenceImages(context.Context, *ListReferenceImagesRequest) (*ListReferenceImagesResponse, error)
// Gets information associated with a ReferenceImage.
//
// Possible errors:
//
// * Returns NOT_FOUND if the specified image does not exist.
GetReferenceImage(context.Context, *GetReferenceImageRequest) (*ReferenceImage, error)
// Adds a Product to the specified ProductSet. If the Product is already
// present, no change is made.
//
// One Product can be added to at most 100 ProductSets.
//
// Possible errors:
//
// * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
AddProductToProductSet(context.Context, *AddProductToProductSetRequest) (*emptypb.Empty, error)
// Removes a Product from the specified ProductSet.
RemoveProductFromProductSet(context.Context, *RemoveProductFromProductSetRequest) (*emptypb.Empty, error)
// Lists the Products in a ProductSet, in an unspecified order. If the
// ProductSet does not exist, the products field of the response will be
// empty.
//
// Possible errors:
//
// * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
ListProductsInProductSet(context.Context, *ListProductsInProductSetRequest) (*ListProductsInProductSetResponse, error)
// Asynchronous API that imports a list of reference images to specified
// product sets based on a list of image information.
//
// The [google.longrunning.Operation][google.longrunning.Operation] API can be
// used to keep track of the progress and results of the request.
// `Operation.metadata` contains `BatchOperationMetadata`. (progress)
// `Operation.response` contains `ImportProductSetsResponse`. (results)
//
// The input source of this method is a csv file on Google Cloud Storage.
// For the format of the csv file please see
// [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
ImportProductSets(context.Context, *ImportProductSetsRequest) (*longrunningpb.Operation, error)
// Asynchronous API to delete all Products in a ProductSet or all Products
// that are in no ProductSet.
//
// If a Product is a member of the specified ProductSet in addition to other
// ProductSets, the Product will still be deleted.
//
// It is recommended to not delete the specified ProductSet until after this
// operation has completed. It is also recommended to not add any of the
// Products involved in the batch delete to a new ProductSet while this
// operation is running because those Products may still end up deleted.
//
// It's not possible to undo the PurgeProducts operation. Therefore, it is
// recommended to keep the csv files used in ImportProductSets (if that was
// how you originally built the Product Set) before starting PurgeProducts, in
// case you need to re-import the data after deletion.
//
// If the plan is to purge all of the Products from a ProductSet and then
// re-use the empty ProductSet to re-import new Products into the empty
// ProductSet, you must wait until the PurgeProducts operation has finished
// for that ProductSet.
//
// The [google.longrunning.Operation][google.longrunning.Operation] API can be
// used to keep track of the progress and results of the request.
// `Operation.metadata` contains `BatchOperationMetadata`. (progress)
PurgeProducts(context.Context, *PurgeProductsRequest) (*longrunningpb.Operation, error)
}ProductSearchServer is the server API for ProductSearch service. All implementations should embed UnimplementedProductSearchServer for forward compatibility
ProductSet
type ProductSet struct {
// The resource name of the ProductSet.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
//
// This field is ignored when creating a ProductSet.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The user-provided name for this ProductSet. Must not be empty. Must be at
// most 4096 characters long.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Output only. The time at which this ProductSet was last indexed. Query
// results will reflect all updates before this time. If this ProductSet has
// never been indexed, this timestamp is the default value
// "1970-01-01T00:00:00Z".
//
// This field is ignored when creating a ProductSet.
IndexTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=index_time,json=indexTime,proto3" json:"index_time,omitempty"`
// Output only. If there was an error with indexing the product set, the field
// is populated.
//
// This field is ignored when creating a ProductSet.
IndexError *status.Status `protobuf:"bytes,4,opt,name=index_error,json=indexError,proto3" json:"index_error,omitempty"`
// contains filtered or unexported fields
}A ProductSet contains Products. A ProductSet can contain a maximum of 1 million reference images. If the limit is exceeded, periodic indexing will fail.
func (*ProductSet) Descriptor
func (*ProductSet) Descriptor() ([]byte, []int)Deprecated: Use ProductSet.ProtoReflect.Descriptor instead.
func (*ProductSet) GetDisplayName
func (x *ProductSet) GetDisplayName() stringfunc (*ProductSet) GetIndexError
func (x *ProductSet) GetIndexError() *status.Statusfunc (*ProductSet) GetIndexTime
func (x *ProductSet) GetIndexTime() *timestamppb.Timestampfunc (*ProductSet) GetName
func (x *ProductSet) GetName() stringfunc (*ProductSet) ProtoMessage
func (*ProductSet) ProtoMessage()func (*ProductSet) ProtoReflect
func (x *ProductSet) ProtoReflect() protoreflect.Messagefunc (*ProductSet) Reset
func (x *ProductSet) Reset()func (*ProductSet) String
func (x *ProductSet) String() stringProductSetPurgeConfig
type ProductSetPurgeConfig struct {
// The ProductSet that contains the Products to delete. If a Product is a
// member of product_set_id in addition to other ProductSets, the Product will
// still be deleted.
ProductSetId string `protobuf:"bytes,1,opt,name=product_set_id,json=productSetId,proto3" json:"product_set_id,omitempty"`
// contains filtered or unexported fields
}Config to control which ProductSet contains the Products to be deleted.
func (*ProductSetPurgeConfig) Descriptor
func (*ProductSetPurgeConfig) Descriptor() ([]byte, []int)Deprecated: Use ProductSetPurgeConfig.ProtoReflect.Descriptor instead.
func (*ProductSetPurgeConfig) GetProductSetId
func (x *ProductSetPurgeConfig) GetProductSetId() stringfunc (*ProductSetPurgeConfig) ProtoMessage
func (*ProductSetPurgeConfig) ProtoMessage()func (*ProductSetPurgeConfig) ProtoReflect
func (x *ProductSetPurgeConfig) ProtoReflect() protoreflect.Messagefunc (*ProductSetPurgeConfig) Reset
func (x *ProductSetPurgeConfig) Reset()func (*ProductSetPurgeConfig) String
func (x *ProductSetPurgeConfig) String() stringProduct_KeyValue
type Product_KeyValue struct {
// The key of the label attached to the product. Cannot be empty and cannot
// exceed 128 bytes.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// The value of the label attached to the product. Cannot be empty and
// cannot exceed 128 bytes.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}A product label represented as a key-value pair.
func (*Product_KeyValue) Descriptor
func (*Product_KeyValue) Descriptor() ([]byte, []int)Deprecated: Use Product_KeyValue.ProtoReflect.Descriptor instead.
func (*Product_KeyValue) GetKey
func (x *Product_KeyValue) GetKey() stringfunc (*Product_KeyValue) GetValue
func (x *Product_KeyValue) GetValue() stringfunc (*Product_KeyValue) ProtoMessage
func (*Product_KeyValue) ProtoMessage()func (*Product_KeyValue) ProtoReflect
func (x *Product_KeyValue) ProtoReflect() protoreflect.Messagefunc (*Product_KeyValue) Reset
func (x *Product_KeyValue) Reset()func (*Product_KeyValue) String
func (x *Product_KeyValue) String() stringProperty
type Property struct {
// Name of the property.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Value of the property.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// Value of numeric properties.
Uint64Value uint64 `protobuf:"varint,3,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
// contains filtered or unexported fields
}A Property consists of a user-supplied name/value pair.
func (*Property) Descriptor
Deprecated: Use Property.ProtoReflect.Descriptor instead.
func (*Property) GetName
func (*Property) GetUint64Value
func (*Property) GetValue
func (*Property) ProtoMessage
func (*Property) ProtoMessage()func (*Property) ProtoReflect
func (x *Property) ProtoReflect() protoreflect.Messagefunc (*Property) Reset
func (x *Property) Reset()func (*Property) String
PurgeProductsRequest
type PurgeProductsRequest struct {
// The Products to delete.
//
// Types that are assignable to Target:
//
// *PurgeProductsRequest_ProductSetPurgeConfig
// *PurgeProductsRequest_DeleteOrphanProducts
Target isPurgeProductsRequest_Target `protobuf_oneof:"target"`
// Required. The project and location in which the Products should be deleted.
//
// Format is `projects/PROJECT_ID/locations/LOC_ID`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The default value is false. Override this value to true to actually perform
// the purge.
Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"`
// contains filtered or unexported fields
}Request message for the PurgeProducts method.
func (*PurgeProductsRequest) Descriptor
func (*PurgeProductsRequest) Descriptor() ([]byte, []int)Deprecated: Use PurgeProductsRequest.ProtoReflect.Descriptor instead.
func (*PurgeProductsRequest) GetDeleteOrphanProducts
func (x *PurgeProductsRequest) GetDeleteOrphanProducts() boolfunc (*PurgeProductsRequest) GetForce
func (x *PurgeProductsRequest) GetForce() boolfunc (*PurgeProductsRequest) GetParent
func (x *PurgeProductsRequest) GetParent() stringfunc (*PurgeProductsRequest) GetProductSetPurgeConfig
func (x *PurgeProductsRequest) GetProductSetPurgeConfig() *ProductSetPurgeConfigfunc (*PurgeProductsRequest) GetTarget
func (m *PurgeProductsRequest) GetTarget() isPurgeProductsRequest_Targetfunc (*PurgeProductsRequest) ProtoMessage
func (*PurgeProductsRequest) ProtoMessage()func (*PurgeProductsRequest) ProtoReflect
func (x *PurgeProductsRequest) ProtoReflect() protoreflect.Messagefunc (*PurgeProductsRequest) Reset
func (x *PurgeProductsRequest) Reset()func (*PurgeProductsRequest) String
func (x *PurgeProductsRequest) String() stringPurgeProductsRequest_DeleteOrphanProducts
type PurgeProductsRequest_DeleteOrphanProducts struct {
// If delete_orphan_products is true, all Products that are not in any
// ProductSet will be deleted.
DeleteOrphanProducts bool `protobuf:"varint,3,opt,name=delete_orphan_products,json=deleteOrphanProducts,proto3,oneof"`
}PurgeProductsRequest_ProductSetPurgeConfig
type PurgeProductsRequest_ProductSetPurgeConfig struct {
// Specify which ProductSet contains the Products to be deleted.
ProductSetPurgeConfig *ProductSetPurgeConfig `protobuf:"bytes,2,opt,name=product_set_purge_config,json=productSetPurgeConfig,proto3,oneof"`
}ReferenceImage
type ReferenceImage struct {
// The resource name of the reference image.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
//
// This field is ignored when creating a reference image.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The Google Cloud Storage URI of the reference image.
//
// The URI must start with `gs://`.
Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
// 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).
BoundingPolys []*BoundingPoly `protobuf:"bytes,3,rep,name=bounding_polys,json=boundingPolys,proto3" json:"bounding_polys,omitempty"`
// contains filtered or unexported fields
}A ReferenceImage represents a product image and its associated metadata,
such as bounding boxes.
func (*ReferenceImage) Descriptor
func (*ReferenceImage) Descriptor() ([]byte, []int)Deprecated: Use ReferenceImage.ProtoReflect.Descriptor instead.
func (*ReferenceImage) GetBoundingPolys
func (x *ReferenceImage) GetBoundingPolys() []*BoundingPolyfunc (*ReferenceImage) GetName
func (x *ReferenceImage) GetName() stringfunc (*ReferenceImage) GetUri
func (x *ReferenceImage) GetUri() stringfunc (*ReferenceImage) ProtoMessage
func (*ReferenceImage) ProtoMessage()func (*ReferenceImage) ProtoReflect
func (x *ReferenceImage) ProtoReflect() protoreflect.Messagefunc (*ReferenceImage) Reset
func (x *ReferenceImage) Reset()func (*ReferenceImage) String
func (x *ReferenceImage) String() stringRemoveProductFromProductSetRequest
type RemoveProductFromProductSetRequest struct {
// Required. The resource name for the ProductSet to modify.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The resource name for the Product to be removed from this
// ProductSet.
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
Product string `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"`
// contains filtered or unexported fields
}Request message for the RemoveProductFromProductSet method.
func (*RemoveProductFromProductSetRequest) Descriptor
func (*RemoveProductFromProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use RemoveProductFromProductSetRequest.ProtoReflect.Descriptor instead.
func (*RemoveProductFromProductSetRequest) GetName
func (x *RemoveProductFromProductSetRequest) GetName() stringfunc (*RemoveProductFromProductSetRequest) GetProduct
func (x *RemoveProductFromProductSetRequest) GetProduct() stringfunc (*RemoveProductFromProductSetRequest) ProtoMessage
func (*RemoveProductFromProductSetRequest) ProtoMessage()func (*RemoveProductFromProductSetRequest) ProtoReflect
func (x *RemoveProductFromProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*RemoveProductFromProductSetRequest) Reset
func (x *RemoveProductFromProductSetRequest) Reset()func (*RemoveProductFromProductSetRequest) String
func (x *RemoveProductFromProductSetRequest) String() stringSafeSearchAnnotation
type SafeSearchAnnotation struct {
// Represents the adult content likelihood for the image. Adult content may
// contain elements such as nudity, pornographic images or cartoons, or
// sexual activities.
Adult Likelihood `protobuf:"varint,1,opt,name=adult,proto3,enum=google.cloud.vision.v1.Likelihood" json:"adult,omitempty"`
// Spoof likelihood. The likelihood that an modification
// was made to the image's canonical version to make it appear
// funny or offensive.
Spoof Likelihood `protobuf:"varint,2,opt,name=spoof,proto3,enum=google.cloud.vision.v1.Likelihood" json:"spoof,omitempty"`
// Likelihood that this is a medical image.
Medical Likelihood `protobuf:"varint,3,opt,name=medical,proto3,enum=google.cloud.vision.v1.Likelihood" json:"medical,omitempty"`
// Likelihood that this image contains violent content. Violent content may
// include death, serious harm, or injury to individuals or groups of
// individuals.
Violence Likelihood `protobuf:"varint,4,opt,name=violence,proto3,enum=google.cloud.vision.v1.Likelihood" json:"violence,omitempty"`
// Likelihood that the request image contains racy content. Racy content may
// include (but is not limited to) skimpy or sheer clothing, strategically
// covered nudity, lewd or provocative poses, or close-ups of sensitive
// body areas.
Racy Likelihood `protobuf:"varint,9,opt,name=racy,proto3,enum=google.cloud.vision.v1.Likelihood" json:"racy,omitempty"`
// contains filtered or unexported fields
}Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
func (*SafeSearchAnnotation) Descriptor
func (*SafeSearchAnnotation) Descriptor() ([]byte, []int)Deprecated: Use SafeSearchAnnotation.ProtoReflect.Descriptor instead.
func (*SafeSearchAnnotation) GetAdult
func (x *SafeSearchAnnotation) GetAdult() Likelihoodfunc (*SafeSearchAnnotation) GetMedical
func (x *SafeSearchAnnotation) GetMedical() Likelihoodfunc (*SafeSearchAnnotation) GetRacy
func (x *SafeSearchAnnotation) GetRacy() Likelihoodfunc (*SafeSearchAnnotation) GetSpoof
func (x *SafeSearchAnnotation) GetSpoof() Likelihoodfunc (*SafeSearchAnnotation) GetViolence
func (x *SafeSearchAnnotation) GetViolence() Likelihoodfunc (*SafeSearchAnnotation) ProtoMessage
func (*SafeSearchAnnotation) ProtoMessage()func (*SafeSearchAnnotation) ProtoReflect
func (x *SafeSearchAnnotation) ProtoReflect() protoreflect.Messagefunc (*SafeSearchAnnotation) Reset
func (x *SafeSearchAnnotation) Reset()func (*SafeSearchAnnotation) String
func (x *SafeSearchAnnotation) String() stringSymbol
type Symbol struct {
// Additional information detected for the symbol.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The bounding box for the symbol.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// - when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// - when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertex order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
// The actual UTF-8 representation of the symbol.
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
// Confidence of the OCR results for the symbol. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
// contains filtered or unexported fields
}A single symbol representation.
func (*Symbol) Descriptor
Deprecated: Use Symbol.ProtoReflect.Descriptor instead.
func (*Symbol) GetBoundingBox
func (x *Symbol) GetBoundingBox() *BoundingPolyfunc (*Symbol) GetConfidence
func (*Symbol) GetProperty
func (x *Symbol) GetProperty() *TextAnnotation_TextPropertyfunc (*Symbol) GetText
func (*Symbol) ProtoMessage
func (*Symbol) ProtoMessage()func (*Symbol) ProtoReflect
func (x *Symbol) ProtoReflect() protoreflect.Messagefunc (*Symbol) Reset
func (x *Symbol) Reset()func (*Symbol) String
TextAnnotation
type TextAnnotation struct {
// List of pages detected by OCR.
Pages []*Page `protobuf:"bytes,1,rep,name=pages,proto3" json:"pages,omitempty"`
// UTF-8 text detected on the pages.
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this:
TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more detail.
func (*TextAnnotation) Descriptor
func (*TextAnnotation) Descriptor() ([]byte, []int)Deprecated: Use TextAnnotation.ProtoReflect.Descriptor instead.
func (*TextAnnotation) GetPages
func (x *TextAnnotation) GetPages() []*Pagefunc (*TextAnnotation) GetText
func (x *TextAnnotation) GetText() stringfunc (*TextAnnotation) ProtoMessage
func (*TextAnnotation) ProtoMessage()func (*TextAnnotation) ProtoReflect
func (x *TextAnnotation) ProtoReflect() protoreflect.Messagefunc (*TextAnnotation) Reset
func (x *TextAnnotation) Reset()func (*TextAnnotation) String
func (x *TextAnnotation) String() stringTextAnnotation_DetectedBreak
type TextAnnotation_DetectedBreak struct {
// Detected break type.
Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.vision.v1.TextAnnotation_DetectedBreak_BreakType" json:"type,omitempty"`
// True if break prepends the element.
IsPrefix bool `protobuf:"varint,2,opt,name=is_prefix,json=isPrefix,proto3" json:"is_prefix,omitempty"`
// contains filtered or unexported fields
}Detected start or end of a structural component.
func (*TextAnnotation_DetectedBreak) Descriptor
func (*TextAnnotation_DetectedBreak) Descriptor() ([]byte, []int)Deprecated: Use TextAnnotation_DetectedBreak.ProtoReflect.Descriptor instead.
func (*TextAnnotation_DetectedBreak) GetIsPrefix
func (x *TextAnnotation_DetectedBreak) GetIsPrefix() boolfunc (*TextAnnotation_DetectedBreak) GetType
func (x *TextAnnotation_DetectedBreak) GetType() TextAnnotation_DetectedBreak_BreakTypefunc (*TextAnnotation_DetectedBreak) ProtoMessage
func (*TextAnnotation_DetectedBreak) ProtoMessage()func (*TextAnnotation_DetectedBreak) ProtoReflect
func (x *TextAnnotation_DetectedBreak) ProtoReflect() protoreflect.Messagefunc (*TextAnnotation_DetectedBreak) Reset
func (x *TextAnnotation_DetectedBreak) Reset()func (*TextAnnotation_DetectedBreak) String
func (x *TextAnnotation_DetectedBreak) String() stringTextAnnotation_DetectedBreak_BreakType
type TextAnnotation_DetectedBreak_BreakType int32Enum to denote the type of break found. New line, space etc.
TextAnnotation_DetectedBreak_UNKNOWN, TextAnnotation_DetectedBreak_SPACE, TextAnnotation_DetectedBreak_SURE_SPACE, TextAnnotation_DetectedBreak_EOL_SURE_SPACE, TextAnnotation_DetectedBreak_HYPHEN, TextAnnotation_DetectedBreak_LINE_BREAK
const (
// Unknown break label type.
TextAnnotation_DetectedBreak_UNKNOWN TextAnnotation_DetectedBreak_BreakType = 0
// Regular space.
TextAnnotation_DetectedBreak_SPACE TextAnnotation_DetectedBreak_BreakType = 1
// Sure space (very wide).
TextAnnotation_DetectedBreak_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 2
// Line-wrapping break.
TextAnnotation_DetectedBreak_EOL_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 3
// End-line hyphen that is not present in text; does not co-occur with
// `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
// Line break that ends a paragraph.
TextAnnotation_DetectedBreak_LINE_BREAK TextAnnotation_DetectedBreak_BreakType = 5
)func (TextAnnotation_DetectedBreak_BreakType) Descriptor
func (TextAnnotation_DetectedBreak_BreakType) Descriptor() protoreflect.EnumDescriptorfunc (TextAnnotation_DetectedBreak_BreakType) Enum
func (TextAnnotation_DetectedBreak_BreakType) EnumDescriptor
func (TextAnnotation_DetectedBreak_BreakType) EnumDescriptor() ([]byte, []int)Deprecated: Use TextAnnotation_DetectedBreak_BreakType.Descriptor instead.
func (TextAnnotation_DetectedBreak_BreakType) Number
func (x TextAnnotation_DetectedBreak_BreakType) Number() protoreflect.EnumNumberfunc (TextAnnotation_DetectedBreak_BreakType) String
func (x TextAnnotation_DetectedBreak_BreakType) String() stringfunc (TextAnnotation_DetectedBreak_BreakType) Type
func (TextAnnotation_DetectedBreak_BreakType) Type() protoreflect.EnumTypeTextAnnotation_DetectedLanguage
type TextAnnotation_DetectedLanguage struct {
// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// Confidence of detected language. Range [0, 1].
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
// contains filtered or unexported fields
}Detected language for a structural component.
func (*TextAnnotation_DetectedLanguage) Descriptor
func (*TextAnnotation_DetectedLanguage) Descriptor() ([]byte, []int)Deprecated: Use TextAnnotation_DetectedLanguage.ProtoReflect.Descriptor instead.
func (*TextAnnotation_DetectedLanguage) GetConfidence
func (x *TextAnnotation_DetectedLanguage) GetConfidence() float32func (*TextAnnotation_DetectedLanguage) GetLanguageCode
func (x *TextAnnotation_DetectedLanguage) GetLanguageCode() stringfunc (*TextAnnotation_DetectedLanguage) ProtoMessage
func (*TextAnnotation_DetectedLanguage) ProtoMessage()func (*TextAnnotation_DetectedLanguage) ProtoReflect
func (x *TextAnnotation_DetectedLanguage) ProtoReflect() protoreflect.Messagefunc (*TextAnnotation_DetectedLanguage) Reset
func (x *TextAnnotation_DetectedLanguage) Reset()func (*TextAnnotation_DetectedLanguage) String
func (x *TextAnnotation_DetectedLanguage) String() stringTextAnnotation_TextProperty
type TextAnnotation_TextProperty struct {
// A list of detected languages together with confidence.
DetectedLanguages []*TextAnnotation_DetectedLanguage `protobuf:"bytes,1,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"`
// Detected start or end of a text segment.
DetectedBreak *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak,proto3" json:"detected_break,omitempty"`
// contains filtered or unexported fields
}Additional information detected on the structural component.
func (*TextAnnotation_TextProperty) Descriptor
func (*TextAnnotation_TextProperty) Descriptor() ([]byte, []int)Deprecated: Use TextAnnotation_TextProperty.ProtoReflect.Descriptor instead.
func (*TextAnnotation_TextProperty) GetDetectedBreak
func (x *TextAnnotation_TextProperty) GetDetectedBreak() *TextAnnotation_DetectedBreakfunc (*TextAnnotation_TextProperty) GetDetectedLanguages
func (x *TextAnnotation_TextProperty) GetDetectedLanguages() []*TextAnnotation_DetectedLanguagefunc (*TextAnnotation_TextProperty) ProtoMessage
func (*TextAnnotation_TextProperty) ProtoMessage()func (*TextAnnotation_TextProperty) ProtoReflect
func (x *TextAnnotation_TextProperty) ProtoReflect() protoreflect.Messagefunc (*TextAnnotation_TextProperty) Reset
func (x *TextAnnotation_TextProperty) Reset()func (*TextAnnotation_TextProperty) String
func (x *TextAnnotation_TextProperty) String() stringTextDetectionParams
type TextDetectionParams struct {
// By default, Cloud Vision API only includes confidence score for
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
// score for TEXT_DETECTION as well.
EnableTextDetectionConfidenceScore bool `protobuf:"varint,9,opt,name=enable_text_detection_confidence_score,json=enableTextDetectionConfidenceScore,proto3" json:"enable_text_detection_confidence_score,omitempty"`
// A list of advanced OCR options to further fine-tune OCR behavior.
// Current valid values are:
//
// - `legacy_layout`: a heuristics layout detection algorithm, which serves as
// an alternative to the current ML-based layout detection algorithm.
// Customers can choose the best suitable layout algorithm based on their
// situation.
AdvancedOcrOptions []string `protobuf:"bytes,11,rep,name=advanced_ocr_options,json=advancedOcrOptions,proto3" json:"advanced_ocr_options,omitempty"`
// contains filtered or unexported fields
}Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.
func (*TextDetectionParams) Descriptor
func (*TextDetectionParams) Descriptor() ([]byte, []int)Deprecated: Use TextDetectionParams.ProtoReflect.Descriptor instead.
func (*TextDetectionParams) GetAdvancedOcrOptions
func (x *TextDetectionParams) GetAdvancedOcrOptions() []stringfunc (*TextDetectionParams) GetEnableTextDetectionConfidenceScore
func (x *TextDetectionParams) GetEnableTextDetectionConfidenceScore() boolfunc (*TextDetectionParams) ProtoMessage
func (*TextDetectionParams) ProtoMessage()func (*TextDetectionParams) ProtoReflect
func (x *TextDetectionParams) ProtoReflect() protoreflect.Messagefunc (*TextDetectionParams) Reset
func (x *TextDetectionParams) Reset()func (*TextDetectionParams) String
func (x *TextDetectionParams) String() stringUnimplementedImageAnnotatorServer
type UnimplementedImageAnnotatorServer struct {
}UnimplementedImageAnnotatorServer should be embedded to have forward compatible implementations.
func (UnimplementedImageAnnotatorServer) AsyncBatchAnnotateFiles
func (UnimplementedImageAnnotatorServer) AsyncBatchAnnotateFiles(context.Context, *AsyncBatchAnnotateFilesRequest) (*longrunningpb.Operation, error)func (UnimplementedImageAnnotatorServer) AsyncBatchAnnotateImages
func (UnimplementedImageAnnotatorServer) AsyncBatchAnnotateImages(context.Context, *AsyncBatchAnnotateImagesRequest) (*longrunningpb.Operation, error)func (UnimplementedImageAnnotatorServer) BatchAnnotateFiles
func (UnimplementedImageAnnotatorServer) BatchAnnotateFiles(context.Context, *BatchAnnotateFilesRequest) (*BatchAnnotateFilesResponse, error)func (UnimplementedImageAnnotatorServer) BatchAnnotateImages
func (UnimplementedImageAnnotatorServer) BatchAnnotateImages(context.Context, *BatchAnnotateImagesRequest) (*BatchAnnotateImagesResponse, error)UnimplementedProductSearchServer
type UnimplementedProductSearchServer struct {
}UnimplementedProductSearchServer should be embedded to have forward compatible implementations.
func (UnimplementedProductSearchServer) AddProductToProductSet
func (UnimplementedProductSearchServer) AddProductToProductSet(context.Context, *AddProductToProductSetRequest) (*emptypb.Empty, error)func (UnimplementedProductSearchServer) CreateProduct
func (UnimplementedProductSearchServer) CreateProduct(context.Context, *CreateProductRequest) (*Product, error)func (UnimplementedProductSearchServer) CreateProductSet
func (UnimplementedProductSearchServer) CreateProductSet(context.Context, *CreateProductSetRequest) (*ProductSet, error)func (UnimplementedProductSearchServer) CreateReferenceImage
func (UnimplementedProductSearchServer) CreateReferenceImage(context.Context, *CreateReferenceImageRequest) (*ReferenceImage, error)func (UnimplementedProductSearchServer) DeleteProduct
func (UnimplementedProductSearchServer) DeleteProduct(context.Context, *DeleteProductRequest) (*emptypb.Empty, error)func (UnimplementedProductSearchServer) DeleteProductSet
func (UnimplementedProductSearchServer) DeleteProductSet(context.Context, *DeleteProductSetRequest) (*emptypb.Empty, error)func (UnimplementedProductSearchServer) DeleteReferenceImage
func (UnimplementedProductSearchServer) DeleteReferenceImage(context.Context, *DeleteReferenceImageRequest) (*emptypb.Empty, error)func (UnimplementedProductSearchServer) GetProduct
func (UnimplementedProductSearchServer) GetProduct(context.Context, *GetProductRequest) (*Product, error)func (UnimplementedProductSearchServer) GetProductSet
func (UnimplementedProductSearchServer) GetProductSet(context.Context, *GetProductSetRequest) (*ProductSet, error)func (UnimplementedProductSearchServer) GetReferenceImage
func (UnimplementedProductSearchServer) GetReferenceImage(context.Context, *GetReferenceImageRequest) (*ReferenceImage, error)func (UnimplementedProductSearchServer) ImportProductSets
func (UnimplementedProductSearchServer) ImportProductSets(context.Context, *ImportProductSetsRequest) (*longrunningpb.Operation, error)func (UnimplementedProductSearchServer) ListProductSets
func (UnimplementedProductSearchServer) ListProductSets(context.Context, *ListProductSetsRequest) (*ListProductSetsResponse, error)func (UnimplementedProductSearchServer) ListProducts
func (UnimplementedProductSearchServer) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)func (UnimplementedProductSearchServer) ListProductsInProductSet
func (UnimplementedProductSearchServer) ListProductsInProductSet(context.Context, *ListProductsInProductSetRequest) (*ListProductsInProductSetResponse, error)func (UnimplementedProductSearchServer) ListReferenceImages
func (UnimplementedProductSearchServer) ListReferenceImages(context.Context, *ListReferenceImagesRequest) (*ListReferenceImagesResponse, error)func (UnimplementedProductSearchServer) PurgeProducts
func (UnimplementedProductSearchServer) PurgeProducts(context.Context, *PurgeProductsRequest) (*longrunningpb.Operation, error)func (UnimplementedProductSearchServer) RemoveProductFromProductSet
func (UnimplementedProductSearchServer) RemoveProductFromProductSet(context.Context, *RemoveProductFromProductSetRequest) (*emptypb.Empty, error)func (UnimplementedProductSearchServer) UpdateProduct
func (UnimplementedProductSearchServer) UpdateProduct(context.Context, *UpdateProductRequest) (*Product, error)func (UnimplementedProductSearchServer) UpdateProductSet
func (UnimplementedProductSearchServer) UpdateProductSet(context.Context, *UpdateProductSetRequest) (*ProductSet, error)UnsafeImageAnnotatorServer
type UnsafeImageAnnotatorServer interface {
// contains filtered or unexported methods
}UnsafeImageAnnotatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ImageAnnotatorServer will result in compilation errors.
UnsafeProductSearchServer
type UnsafeProductSearchServer interface {
// contains filtered or unexported methods
}UnsafeProductSearchServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductSearchServer will result in compilation errors.
UpdateProductRequest
type UpdateProductRequest struct {
// Required. The Product resource which replaces the one on the server.
// product.name is immutable.
Product *Product `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"`
// The [FieldMask][google.protobuf.FieldMask] that specifies which fields
// to update.
// If update_mask isn't specified, all mutable fields are to be updated.
// Valid mask paths include `product_labels`, `display_name`, and
// `description`.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// contains filtered or unexported fields
}Request message for the UpdateProduct method.
func (*UpdateProductRequest) Descriptor
func (*UpdateProductRequest) Descriptor() ([]byte, []int)Deprecated: Use UpdateProductRequest.ProtoReflect.Descriptor instead.
func (*UpdateProductRequest) GetProduct
func (x *UpdateProductRequest) GetProduct() *Productfunc (*UpdateProductRequest) GetUpdateMask
func (x *UpdateProductRequest) GetUpdateMask() *fieldmaskpb.FieldMaskfunc (*UpdateProductRequest) ProtoMessage
func (*UpdateProductRequest) ProtoMessage()func (*UpdateProductRequest) ProtoReflect
func (x *UpdateProductRequest) ProtoReflect() protoreflect.Messagefunc (*UpdateProductRequest) Reset
func (x *UpdateProductRequest) Reset()func (*UpdateProductRequest) String
func (x *UpdateProductRequest) String() stringUpdateProductSetRequest
type UpdateProductSetRequest struct {
// Required. The ProductSet resource which replaces the one on the server.
ProductSet *ProductSet `protobuf:"bytes,1,opt,name=product_set,json=productSet,proto3" json:"product_set,omitempty"`
// The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
// update.
// If update_mask isn't specified, all mutable fields are to be updated.
// Valid mask path is `display_name`.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// contains filtered or unexported fields
}Request message for the UpdateProductSet method.
func (*UpdateProductSetRequest) Descriptor
func (*UpdateProductSetRequest) Descriptor() ([]byte, []int)Deprecated: Use UpdateProductSetRequest.ProtoReflect.Descriptor instead.
func (*UpdateProductSetRequest) GetProductSet
func (x *UpdateProductSetRequest) GetProductSet() *ProductSetfunc (*UpdateProductSetRequest) GetUpdateMask
func (x *UpdateProductSetRequest) GetUpdateMask() *fieldmaskpb.FieldMaskfunc (*UpdateProductSetRequest) ProtoMessage
func (*UpdateProductSetRequest) ProtoMessage()func (*UpdateProductSetRequest) ProtoReflect
func (x *UpdateProductSetRequest) ProtoReflect() protoreflect.Messagefunc (*UpdateProductSetRequest) Reset
func (x *UpdateProductSetRequest) Reset()func (*UpdateProductSetRequest) String
func (x *UpdateProductSetRequest) String() stringVertex
type Vertex struct {
// X coordinate.
X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
// Y coordinate.
Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
// contains filtered or unexported fields
}A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
func (*Vertex) Descriptor
Deprecated: Use Vertex.ProtoReflect.Descriptor instead.
func (*Vertex) GetX
func (*Vertex) GetY
func (*Vertex) ProtoMessage
func (*Vertex) ProtoMessage()func (*Vertex) ProtoReflect
func (x *Vertex) ProtoReflect() protoreflect.Messagefunc (*Vertex) Reset
func (x *Vertex) Reset()func (*Vertex) String
WebDetection
type WebDetection struct {
// Deduced entities from similar images on the Internet.
WebEntities []*WebDetection_WebEntity `protobuf:"bytes,1,rep,name=web_entities,json=webEntities,proto3" json:"web_entities,omitempty"`
// Fully matching images from the Internet.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images from the Internet.
// Those images are similar enough to share some key-point features. For
// example an original image will likely have partial matching for its crops.
PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,3,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
// Web pages containing the matching images from the Internet.
PagesWithMatchingImages []*WebDetection_WebPage `protobuf:"bytes,4,rep,name=pages_with_matching_images,json=pagesWithMatchingImages,proto3" json:"pages_with_matching_images,omitempty"`
// The visually similar image results.
VisuallySimilarImages []*WebDetection_WebImage `protobuf:"bytes,6,rep,name=visually_similar_images,json=visuallySimilarImages,proto3" json:"visually_similar_images,omitempty"`
// The service's best guess as to the topic of the request image.
// Inferred from similar images on the open web.
BestGuessLabels []*WebDetection_WebLabel `protobuf:"bytes,8,rep,name=best_guess_labels,json=bestGuessLabels,proto3" json:"best_guess_labels,omitempty"`
// contains filtered or unexported fields
}Relevant information for the image from the Internet.
func (*WebDetection) Descriptor
func (*WebDetection) Descriptor() ([]byte, []int)Deprecated: Use WebDetection.ProtoReflect.Descriptor instead.
func (*WebDetection) GetBestGuessLabels
func (x *WebDetection) GetBestGuessLabels() []*WebDetection_WebLabelfunc (*WebDetection) GetFullMatchingImages
func (x *WebDetection) GetFullMatchingImages() []*WebDetection_WebImagefunc (*WebDetection) GetPagesWithMatchingImages
func (x *WebDetection) GetPagesWithMatchingImages() []*WebDetection_WebPagefunc (*WebDetection) GetPartialMatchingImages
func (x *WebDetection) GetPartialMatchingImages() []*WebDetection_WebImagefunc (*WebDetection) GetVisuallySimilarImages
func (x *WebDetection) GetVisuallySimilarImages() []*WebDetection_WebImagefunc (*WebDetection) GetWebEntities
func (x *WebDetection) GetWebEntities() []*WebDetection_WebEntityfunc (*WebDetection) ProtoMessage
func (*WebDetection) ProtoMessage()func (*WebDetection) ProtoReflect
func (x *WebDetection) ProtoReflect() protoreflect.Messagefunc (*WebDetection) Reset
func (x *WebDetection) Reset()func (*WebDetection) String
func (x *WebDetection) String() stringWebDetectionParams
type WebDetectionParams struct {
// This field has no effect on results.
//
// Deprecated: Marked as deprecated in google/cloud/vision/v1/image_annotator.proto.
IncludeGeoResults bool `protobuf:"varint,2,opt,name=include_geo_results,json=includeGeoResults,proto3" json:"include_geo_results,omitempty"`
// contains filtered or unexported fields
}Parameters for web detection request.
func (*WebDetectionParams) Descriptor
func (*WebDetectionParams) Descriptor() ([]byte, []int)Deprecated: Use WebDetectionParams.ProtoReflect.Descriptor instead.
func (*WebDetectionParams) GetIncludeGeoResults
func (x *WebDetectionParams) GetIncludeGeoResults() boolDeprecated: Marked as deprecated in google/cloud/vision/v1/image_annotator.proto.
func (*WebDetectionParams) ProtoMessage
func (*WebDetectionParams) ProtoMessage()func (*WebDetectionParams) ProtoReflect
func (x *WebDetectionParams) ProtoReflect() protoreflect.Messagefunc (*WebDetectionParams) Reset
func (x *WebDetectionParams) Reset()func (*WebDetectionParams) String
func (x *WebDetectionParams) String() stringWebDetection_WebEntity
type WebDetection_WebEntity struct {
// Opaque entity ID.
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
// Overall relevancy score for the entity.
// Not normalized and not comparable across different image queries.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Canonical description of the entity, in English.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}Entity deduced from similar images on the Internet.
func (*WebDetection_WebEntity) Descriptor
func (*WebDetection_WebEntity) Descriptor() ([]byte, []int)Deprecated: Use WebDetection_WebEntity.ProtoReflect.Descriptor instead.
func (*WebDetection_WebEntity) GetDescription
func (x *WebDetection_WebEntity) GetDescription() stringfunc (*WebDetection_WebEntity) GetEntityId
func (x *WebDetection_WebEntity) GetEntityId() stringfunc (*WebDetection_WebEntity) GetScore
func (x *WebDetection_WebEntity) GetScore() float32func (*WebDetection_WebEntity) ProtoMessage
func (*WebDetection_WebEntity) ProtoMessage()func (*WebDetection_WebEntity) ProtoReflect
func (x *WebDetection_WebEntity) ProtoReflect() protoreflect.Messagefunc (*WebDetection_WebEntity) Reset
func (x *WebDetection_WebEntity) Reset()func (*WebDetection_WebEntity) String
func (x *WebDetection_WebEntity) String() stringWebDetection_WebImage
type WebDetection_WebImage struct {
// The result image URL.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the image.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// contains filtered or unexported fields
}Metadata for online images.
func (*WebDetection_WebImage) Descriptor
func (*WebDetection_WebImage) Descriptor() ([]byte, []int)Deprecated: Use WebDetection_WebImage.ProtoReflect.Descriptor instead.
func (*WebDetection_WebImage) GetScore
func (x *WebDetection_WebImage) GetScore() float32func (*WebDetection_WebImage) GetUrl
func (x *WebDetection_WebImage) GetUrl() stringfunc (*WebDetection_WebImage) ProtoMessage
func (*WebDetection_WebImage) ProtoMessage()func (*WebDetection_WebImage) ProtoReflect
func (x *WebDetection_WebImage) ProtoReflect() protoreflect.Messagefunc (*WebDetection_WebImage) Reset
func (x *WebDetection_WebImage) Reset()func (*WebDetection_WebImage) String
func (x *WebDetection_WebImage) String() stringWebDetection_WebLabel
type WebDetection_WebLabel struct {
// Label for extra metadata.
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
// The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// contains filtered or unexported fields
}Label to provide extra metadata for the web detection.
func (*WebDetection_WebLabel) Descriptor
func (*WebDetection_WebLabel) Descriptor() ([]byte, []int)Deprecated: Use WebDetection_WebLabel.ProtoReflect.Descriptor instead.
func (*WebDetection_WebLabel) GetLabel
func (x *WebDetection_WebLabel) GetLabel() stringfunc (*WebDetection_WebLabel) GetLanguageCode
func (x *WebDetection_WebLabel) GetLanguageCode() stringfunc (*WebDetection_WebLabel) ProtoMessage
func (*WebDetection_WebLabel) ProtoMessage()func (*WebDetection_WebLabel) ProtoReflect
func (x *WebDetection_WebLabel) ProtoReflect() protoreflect.Messagefunc (*WebDetection_WebLabel) Reset
func (x *WebDetection_WebLabel) Reset()func (*WebDetection_WebLabel) String
func (x *WebDetection_WebLabel) String() stringWebDetection_WebPage
type WebDetection_WebPage struct {
// The result web page URL.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the web page.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Title for the web page, may contain HTML markups.
PageTitle string `protobuf:"bytes,3,opt,name=page_title,json=pageTitle,proto3" json:"page_title,omitempty"`
// Fully matching images on the page.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,4,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images on the page.
// Those images are similar enough to share some key-point features. For
// example an original image will likely have partial matching for its
// crops.
PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,5,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
// contains filtered or unexported fields
}Metadata for web pages.
func (*WebDetection_WebPage) Descriptor
func (*WebDetection_WebPage) Descriptor() ([]byte, []int)Deprecated: Use WebDetection_WebPage.ProtoReflect.Descriptor instead.
func (*WebDetection_WebPage) GetFullMatchingImages
func (x *WebDetection_WebPage) GetFullMatchingImages() []*WebDetection_WebImagefunc (*WebDetection_WebPage) GetPageTitle
func (x *WebDetection_WebPage) GetPageTitle() stringfunc (*WebDetection_WebPage) GetPartialMatchingImages
func (x *WebDetection_WebPage) GetPartialMatchingImages() []*WebDetection_WebImagefunc (*WebDetection_WebPage) GetScore
func (x *WebDetection_WebPage) GetScore() float32func (*WebDetection_WebPage) GetUrl
func (x *WebDetection_WebPage) GetUrl() stringfunc (*WebDetection_WebPage) ProtoMessage
func (*WebDetection_WebPage) ProtoMessage()func (*WebDetection_WebPage) ProtoReflect
func (x *WebDetection_WebPage) ProtoReflect() protoreflect.Messagefunc (*WebDetection_WebPage) Reset
func (x *WebDetection_WebPage) Reset()func (*WebDetection_WebPage) String
func (x *WebDetection_WebPage) String() stringWord
type Word struct {
// Additional information detected for the word.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
// The bounding box for the word.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// - when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// - when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertex order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
// List of symbols in the word.
// The order of the symbols follows the natural reading order.
Symbols []*Symbol `protobuf:"bytes,3,rep,name=symbols,proto3" json:"symbols,omitempty"`
// Confidence of the OCR results for the word. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
// contains filtered or unexported fields
}A word representation.
func (*Word) Descriptor
Deprecated: Use Word.ProtoReflect.Descriptor instead.
func (*Word) GetBoundingBox
func (x *Word) GetBoundingBox() *BoundingPolyfunc (*Word) GetConfidence
func (*Word) GetProperty
func (x *Word) GetProperty() *TextAnnotation_TextPropertyfunc (*Word) GetSymbols
func (*Word) ProtoMessage
func (*Word) ProtoMessage()func (*Word) ProtoReflect
func (x *Word) ProtoReflect() protoreflect.Messagefunc (*Word) Reset
func (x *Word) Reset()