var File_google_chromeos_uidetection_v1_ui_detection_proto protoreflect.FileDescriptor
func RegisterUiDetectionServiceServer(s *grpc.Server, srv UiDetectionServiceServer)
The location of a UI element. A bounding box is reprensented by its top-left point [left, top] and its bottom-right point [right, bottom].
type BoundingBox struct { // The text found in the bounding box. Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // The y-coordinate of the top-left point. Top int32 `protobuf:"varint,2,opt,name=top,proto3" json:"top,omitempty"` // The x-coordinate of the top-left point. Left int32 `protobuf:"varint,3,opt,name=left,proto3" json:"left,omitempty"` // The y-coordinate of the bottom-right point. Bottom int32 `protobuf:"varint,4,opt,name=bottom,proto3" json:"bottom,omitempty"` // The x-coordinate of the bottom-right point. Right int32 `protobuf:"varint,5,opt,name=right,proto3" json:"right,omitempty"` // contains filtered or unexported fields }
func (*BoundingBox) Descriptor() ([]byte, []int)
Deprecated: Use BoundingBox.ProtoReflect.Descriptor instead.
func (x *BoundingBox) GetBottom() int32
func (x *BoundingBox) GetLeft() int32
func (x *BoundingBox) GetRight() int32
func (x *BoundingBox) GetText() string
func (x *BoundingBox) GetTop() int32
func (*BoundingBox) ProtoMessage()
func (x *BoundingBox) ProtoReflect() protoreflect.Message
func (x *BoundingBox) Reset()
func (x *BoundingBox) String() string
Detection type for custom icon detection.
type CustomIconDetectionRequest struct { // Required. Required field that represents an icon in PNG format. IconPng []byte `protobuf:"bytes,1,opt,name=icon_png,json=iconPng,proto3" json:"icon_png,omitempty"` // Set match_count to -1 to not limit the number of matches. MatchCount int32 `protobuf:"varint,2,opt,name=match_count,json=matchCount,proto3" json:"match_count,omitempty"` // Confidence threshold in the range [0.0, 1.0] below which the matches will // be considered as non-existent. MinConfidenceThreshold float64 `protobuf:"fixed64,3,opt,name=min_confidence_threshold,json=minConfidenceThreshold,proto3" json:"min_confidence_threshold,omitempty"` // contains filtered or unexported fields }
func (*CustomIconDetectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CustomIconDetectionRequest.ProtoReflect.Descriptor instead.
func (x *CustomIconDetectionRequest) GetIconPng() []byte
func (x *CustomIconDetectionRequest) GetMatchCount() int32
func (x *CustomIconDetectionRequest) GetMinConfidenceThreshold() float64
func (*CustomIconDetectionRequest) ProtoMessage()
func (x *CustomIconDetectionRequest) ProtoReflect() protoreflect.Message
func (x *CustomIconDetectionRequest) Reset()
func (x *CustomIconDetectionRequest) String() string
Detection type specifies what to detect in the image.
type DetectionRequest struct { // Types that are assignable to DetectionRequestType: // // *DetectionRequest_WordDetectionRequest // *DetectionRequest_TextBlockDetectionRequest // *DetectionRequest_CustomIconDetectionRequest DetectionRequestType isDetectionRequest_DetectionRequestType `protobuf_oneof:"detection_request_type"` // contains filtered or unexported fields }
func (*DetectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use DetectionRequest.ProtoReflect.Descriptor instead.
func (x *DetectionRequest) GetCustomIconDetectionRequest() *CustomIconDetectionRequest
func (m *DetectionRequest) GetDetectionRequestType() isDetectionRequest_DetectionRequestType
func (x *DetectionRequest) GetTextBlockDetectionRequest() *TextBlockDetectionRequest
func (x *DetectionRequest) GetWordDetectionRequest() *WordDetectionRequest
func (*DetectionRequest) ProtoMessage()
func (x *DetectionRequest) ProtoReflect() protoreflect.Message
func (x *DetectionRequest) Reset()
func (x *DetectionRequest) String() string
type DetectionRequest_CustomIconDetectionRequest struct { // Detection type for custom icon detection. CustomIconDetectionRequest *CustomIconDetectionRequest `protobuf:"bytes,3,opt,name=custom_icon_detection_request,json=customIconDetectionRequest,proto3,oneof"` }
type DetectionRequest_TextBlockDetectionRequest struct { // Detection type for text block detection. TextBlockDetectionRequest *TextBlockDetectionRequest `protobuf:"bytes,2,opt,name=text_block_detection_request,json=textBlockDetectionRequest,proto3,oneof"` }
type DetectionRequest_WordDetectionRequest struct { // Detection type for word detection. WordDetectionRequest *WordDetectionRequest `protobuf:"bytes,1,opt,name=word_detection_request,json=wordDetectionRequest,proto3,oneof"` }
Metadata about the client test and test device.
type TestMetadata struct { // Name of the calling test. For example, 'tast.uidetection.BasicDetections'. TestId string `protobuf:"bytes,1,opt,name=test_id,json=testId,proto3" json:"test_id,omitempty"` // Board name of the ChromeOS device under test. For example, 'volteer'. Board string `protobuf:"bytes,2,opt,name=board,proto3" json:"board,omitempty"` // Model name of the ChromeOS device under test. For example, 'volet'. Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` // ChromeOS build of the device under test. // For example, 'volteer-release/R110-15275.0.0-75031-8794956681263330561'. CrosBuild string `protobuf:"bytes,4,opt,name=cros_build,json=crosBuild,proto3" json:"cros_build,omitempty"` // contains filtered or unexported fields }
func (*TestMetadata) Descriptor() ([]byte, []int)
Deprecated: Use TestMetadata.ProtoReflect.Descriptor instead.
func (x *TestMetadata) GetBoard() string
func (x *TestMetadata) GetCrosBuild() string
func (x *TestMetadata) GetModel() string
func (x *TestMetadata) GetTestId() string
func (*TestMetadata) ProtoMessage()
func (x *TestMetadata) ProtoReflect() protoreflect.Message
func (x *TestMetadata) Reset()
func (x *TestMetadata) String() string
Detection type for text block detection.
type TextBlockDetectionRequest struct { // Required. The text block consisting a list of words to locate in the image. Words []string `protobuf:"bytes,1,rep,name=words,proto3" json:"words,omitempty"` // Indicating whether the query string is a regex or not. RegexMode bool `protobuf:"varint,2,opt,name=regex_mode,json=regexMode,proto3" json:"regex_mode,omitempty"` // Indicating whether the detection is an approximate match. DisableApproxMatch bool `protobuf:"varint,3,opt,name=disable_approx_match,json=disableApproxMatch,proto3" json:"disable_approx_match,omitempty"` // Levenshtein distance threshold. // Applicable only if regex_mode is False. MaxEditDistance *int32 `protobuf:"varint,4,opt,name=max_edit_distance,json=maxEditDistance,proto3,oneof" json:"max_edit_distance,omitempty"` // Indicating whether the detection result should only contain the specified // words. SpecifiedWordsOnly bool `protobuf:"varint,5,opt,name=specified_words_only,json=specifiedWordsOnly,proto3" json:"specified_words_only,omitempty"` // contains filtered or unexported fields }
func (*TextBlockDetectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use TextBlockDetectionRequest.ProtoReflect.Descriptor instead.
func (x *TextBlockDetectionRequest) GetDisableApproxMatch() bool
func (x *TextBlockDetectionRequest) GetMaxEditDistance() int32
func (x *TextBlockDetectionRequest) GetRegexMode() bool
func (x *TextBlockDetectionRequest) GetSpecifiedWordsOnly() bool
func (x *TextBlockDetectionRequest) GetWords() []string
func (*TextBlockDetectionRequest) ProtoMessage()
func (x *TextBlockDetectionRequest) ProtoReflect() protoreflect.Message
func (x *TextBlockDetectionRequest) Reset()
func (x *TextBlockDetectionRequest) String() string
Request message for UI detection.
type UiDetectionRequest struct { // Required. Required field that represents a PNG image. ImagePng []byte `protobuf:"bytes,1,opt,name=image_png,json=imagePng,proto3" json:"image_png,omitempty"` // Required. Required field that indicates the detection type. Request *DetectionRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // Indicates whether to fall back to resizing the image if no elements are // detected. ResizeImage *bool `protobuf:"varint,3,opt,name=resize_image,json=resizeImage,proto3,oneof" json:"resize_image,omitempty"` // Deprecated as of 2023-03-29. Use test_metadata instead. // // Deprecated: Do not use. TestId string `protobuf:"bytes,4,opt,name=test_id,json=testId,proto3" json:"test_id,omitempty"` // Optional. Metadata about the client for analytics. TestMetadata *TestMetadata `protobuf:"bytes,5,opt,name=test_metadata,json=testMetadata,proto3" json:"test_metadata,omitempty"` // Optional. Indicates whether to always start by resizing the image. ForceImageResizing bool `protobuf:"varint,6,opt,name=force_image_resizing,json=forceImageResizing,proto3" json:"force_image_resizing,omitempty"` // Optional. Indicates whether to respond with the transformed image png. ReturnTransformedImage bool `protobuf:"varint,7,opt,name=return_transformed_image,json=returnTransformedImage,proto3" json:"return_transformed_image,omitempty"` // contains filtered or unexported fields }
func (*UiDetectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use UiDetectionRequest.ProtoReflect.Descriptor instead.
func (x *UiDetectionRequest) GetForceImageResizing() bool
func (x *UiDetectionRequest) GetImagePng() []byte
func (x *UiDetectionRequest) GetRequest() *DetectionRequest
func (x *UiDetectionRequest) GetResizeImage() bool
func (x *UiDetectionRequest) GetReturnTransformedImage() bool
func (x *UiDetectionRequest) GetTestId() string
Deprecated: Do not use.
func (x *UiDetectionRequest) GetTestMetadata() *TestMetadata
func (*UiDetectionRequest) ProtoMessage()
func (x *UiDetectionRequest) ProtoReflect() protoreflect.Message
func (x *UiDetectionRequest) Reset()
func (x *UiDetectionRequest) String() string
Response message for UI detection.
type UiDetectionResponse struct { // Locations of matching UI elements. BoundingBoxes []*BoundingBox `protobuf:"bytes,1,rep,name=bounding_boxes,json=boundingBoxes,proto3" json:"bounding_boxes,omitempty"` // The transformed detection image PNG, if requested and transformations were // applied. TransformedImagePng []byte `protobuf:"bytes,2,opt,name=transformed_image_png,json=transformedImagePng,proto3" json:"transformed_image_png,omitempty"` // The amount the original image was scaled by to make the transformed image. // 1.0 if the detection result is not based on a resized image. ResizingScaleFactor float32 `protobuf:"fixed32,3,opt,name=resizing_scale_factor,json=resizingScaleFactor,proto3" json:"resizing_scale_factor,omitempty"` // contains filtered or unexported fields }
func (*UiDetectionResponse) Descriptor() ([]byte, []int)
Deprecated: Use UiDetectionResponse.ProtoReflect.Descriptor instead.
func (x *UiDetectionResponse) GetBoundingBoxes() []*BoundingBox
func (x *UiDetectionResponse) GetResizingScaleFactor() float32
func (x *UiDetectionResponse) GetTransformedImagePng() []byte
func (*UiDetectionResponse) ProtoMessage()
func (x *UiDetectionResponse) ProtoReflect() protoreflect.Message
func (x *UiDetectionResponse) Reset()
func (x *UiDetectionResponse) String() string
UiDetectionServiceClient is the client API for UiDetectionService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type UiDetectionServiceClient interface { // Runs the detection. ExecuteDetection(ctx context.Context, in *UiDetectionRequest, opts ...grpc.CallOption) (*UiDetectionResponse, error) }
func NewUiDetectionServiceClient(cc grpc.ClientConnInterface) UiDetectionServiceClient
UiDetectionServiceServer is the server API for UiDetectionService service.
type UiDetectionServiceServer interface { // Runs the detection. ExecuteDetection(context.Context, *UiDetectionRequest) (*UiDetectionResponse, error) }
UnimplementedUiDetectionServiceServer can be embedded to have forward compatible implementations.
type UnimplementedUiDetectionServiceServer struct { }
func (*UnimplementedUiDetectionServiceServer) ExecuteDetection(context.Context, *UiDetectionRequest) (*UiDetectionResponse, error)
Detection type for word detection.
type WordDetectionRequest struct { // Required. The word to locate in the image. Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` // Indicating whether the query string is a regex or not. RegexMode bool `protobuf:"varint,2,opt,name=regex_mode,json=regexMode,proto3" json:"regex_mode,omitempty"` // Indicating whether the detection is an approximate match. DisableApproxMatch bool `protobuf:"varint,3,opt,name=disable_approx_match,json=disableApproxMatch,proto3" json:"disable_approx_match,omitempty"` // Levenshtein distance threshold. // Applicable only if regex_mode is False. MaxEditDistance *int32 `protobuf:"varint,4,opt,name=max_edit_distance,json=maxEditDistance,proto3,oneof" json:"max_edit_distance,omitempty"` // contains filtered or unexported fields }
func (*WordDetectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use WordDetectionRequest.ProtoReflect.Descriptor instead.
func (x *WordDetectionRequest) GetDisableApproxMatch() bool
func (x *WordDetectionRequest) GetMaxEditDistance() int32
func (x *WordDetectionRequest) GetRegexMode() bool
func (x *WordDetectionRequest) GetWord() string
func (*WordDetectionRequest) ProtoMessage()
func (x *WordDetectionRequest) ProtoReflect() protoreflect.Message
func (x *WordDetectionRequest) Reset()
func (x *WordDetectionRequest) String() string