// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/ai/vision/v1/text_detection.proto

package vision

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type TextAnnotation struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Pages of the recognized file.
	//
	// For JPEG and PNG files contains only 1 page.
	Pages         []*Page `protobuf:"bytes,1,rep,name=pages,proto3" json:"pages,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *TextAnnotation) Reset() {
	*x = TextAnnotation{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *TextAnnotation) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*TextAnnotation) ProtoMessage() {}

func (x *TextAnnotation) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use TextAnnotation.ProtoReflect.Descriptor instead.
func (*TextAnnotation) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{0}
}

func (x *TextAnnotation) GetPages() []*Page {
	if x != nil {
		return x.Pages
	}
	return nil
}

type Page struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Page width in pixels.
	Width int64 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// Page height in pixels.
	Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// Recognized text blocks in this page.
	Blocks []*Block `protobuf:"bytes,3,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// Recognized entities
	Entities      []*Entity `protobuf:"bytes,4,rep,name=entities,proto3" json:"entities,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Page) Reset() {
	*x = Page{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Page) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Page) ProtoMessage() {}

func (x *Page) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Page.ProtoReflect.Descriptor instead.
func (*Page) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{1}
}

func (x *Page) GetWidth() int64 {
	if x != nil {
		return x.Width
	}
	return 0
}

func (x *Page) GetHeight() int64 {
	if x != nil {
		return x.Height
	}
	return 0
}

func (x *Page) GetBlocks() []*Block {
	if x != nil {
		return x.Blocks
	}
	return nil
}

func (x *Page) GetEntities() []*Entity {
	if x != nil {
		return x.Entities
	}
	return nil
}

type Entity struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Entity name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Recognized entity text
	Text          string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Entity) Reset() {
	*x = Entity{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Entity) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Entity) ProtoMessage() {}

func (x *Entity) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Entity.ProtoReflect.Descriptor instead.
func (*Entity) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{2}
}

func (x *Entity) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Entity) GetText() string {
	if x != nil {
		return x.Text
	}
	return ""
}

type Block struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Area on the page where the text block is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized lines in this block.
	Lines         []*Line `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Block) Reset() {
	*x = Block{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Block) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Block) ProtoMessage() {}

func (x *Block) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Block.ProtoReflect.Descriptor instead.
func (*Block) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{3}
}

func (x *Block) GetBoundingBox() *Polygon {
	if x != nil {
		return x.BoundingBox
	}
	return nil
}

func (x *Block) GetLines() []*Line {
	if x != nil {
		return x.Lines
	}
	return nil
}

type Line struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Area on the page where the line is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized words in this line.
	Words []*Word `protobuf:"bytes,2,rep,name=words,proto3" json:"words,omitempty"`
	// Confidence of the OCR results for the line. Range [0, 1].
	Confidence    float64 `protobuf:"fixed64,3,opt,name=confidence,proto3" json:"confidence,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Line) Reset() {
	*x = Line{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Line) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Line) ProtoMessage() {}

func (x *Line) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Line.ProtoReflect.Descriptor instead.
func (*Line) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{4}
}

func (x *Line) GetBoundingBox() *Polygon {
	if x != nil {
		return x.BoundingBox
	}
	return nil
}

func (x *Line) GetWords() []*Word {
	if x != nil {
		return x.Words
	}
	return nil
}

func (x *Line) GetConfidence() float64 {
	if x != nil {
		return x.Confidence
	}
	return 0
}

type Word struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Area on the page where the word is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized word value.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// Confidence of the OCR results for the word. Range [0, 1].
	Confidence float64 `protobuf:"fixed64,3,opt,name=confidence,proto3" json:"confidence,omitempty"`
	// A list of detected languages together with confidence.
	Languages []*Word_DetectedLanguage `protobuf:"bytes,4,rep,name=languages,proto3" json:"languages,omitempty"`
	// Id of recognized word in entities array
	EntityIndex   int64 `protobuf:"varint,5,opt,name=entity_index,json=entityIndex,proto3" json:"entity_index,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Word) Reset() {
	*x = Word{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Word) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Word) ProtoMessage() {}

func (x *Word) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Word.ProtoReflect.Descriptor instead.
func (*Word) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{5}
}

func (x *Word) GetBoundingBox() *Polygon {
	if x != nil {
		return x.BoundingBox
	}
	return nil
}

func (x *Word) GetText() string {
	if x != nil {
		return x.Text
	}
	return ""
}

func (x *Word) GetConfidence() float64 {
	if x != nil {
		return x.Confidence
	}
	return 0
}

func (x *Word) GetLanguages() []*Word_DetectedLanguage {
	if x != nil {
		return x.Languages
	}
	return nil
}

func (x *Word) GetEntityIndex() int64 {
	if x != nil {
		return x.EntityIndex
	}
	return 0
}

type Word_DetectedLanguage struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Detected language code.
	LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// Confidence of detected language. Range [0, 1].
	Confidence    float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Word_DetectedLanguage) Reset() {
	*x = Word_DetectedLanguage{}
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Word_DetectedLanguage) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Word_DetectedLanguage) ProtoMessage() {}

func (x *Word_DetectedLanguage) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes[6]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Word_DetectedLanguage.ProtoReflect.Descriptor instead.
func (*Word_DetectedLanguage) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP(), []int{5, 0}
}

func (x *Word_DetectedLanguage) GetLanguageCode() string {
	if x != nil {
		return x.LanguageCode
	}
	return ""
}

func (x *Word_DetectedLanguage) GetConfidence() float64 {
	if x != nil {
		return x.Confidence
	}
	return 0
}

var File_yandex_cloud_ai_vision_v1_text_detection_proto protoreflect.FileDescriptor

const file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDesc = "" +
	"\n" +
	".yandex/cloud/ai/vision/v1/text_detection.proto\x12\x19yandex.cloud.ai.vision.v1\x1a*yandex/cloud/ai/vision/v1/primitives.proto\"G\n" +
	"\x0eTextAnnotation\x125\n" +
	"\x05pages\x18\x01 \x03(\v2\x1f.yandex.cloud.ai.vision.v1.PageR\x05pages\"\xad\x01\n" +
	"\x04Page\x12\x14\n" +
	"\x05width\x18\x01 \x01(\x03R\x05width\x12\x16\n" +
	"\x06height\x18\x02 \x01(\x03R\x06height\x128\n" +
	"\x06blocks\x18\x03 \x03(\v2 .yandex.cloud.ai.vision.v1.BlockR\x06blocks\x12=\n" +
	"\bentities\x18\x04 \x03(\v2!.yandex.cloud.ai.vision.v1.EntityR\bentities\"0\n" +
	"\x06Entity\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
	"\x04text\x18\x02 \x01(\tR\x04text\"\x85\x01\n" +
	"\x05Block\x12E\n" +
	"\fbounding_box\x18\x01 \x01(\v2\".yandex.cloud.ai.vision.v1.PolygonR\vboundingBox\x125\n" +
	"\x05lines\x18\x02 \x03(\v2\x1f.yandex.cloud.ai.vision.v1.LineR\x05lines\"\xa4\x01\n" +
	"\x04Line\x12E\n" +
	"\fbounding_box\x18\x01 \x01(\v2\".yandex.cloud.ai.vision.v1.PolygonR\vboundingBox\x125\n" +
	"\x05words\x18\x02 \x03(\v2\x1f.yandex.cloud.ai.vision.v1.WordR\x05words\x12\x1e\n" +
	"\n" +
	"confidence\x18\x03 \x01(\x01R\n" +
	"confidence\"\xcd\x02\n" +
	"\x04Word\x12E\n" +
	"\fbounding_box\x18\x01 \x01(\v2\".yandex.cloud.ai.vision.v1.PolygonR\vboundingBox\x12\x12\n" +
	"\x04text\x18\x02 \x01(\tR\x04text\x12\x1e\n" +
	"\n" +
	"confidence\x18\x03 \x01(\x01R\n" +
	"confidence\x12N\n" +
	"\tlanguages\x18\x04 \x03(\v20.yandex.cloud.ai.vision.v1.Word.DetectedLanguageR\tlanguages\x12!\n" +
	"\fentity_index\x18\x05 \x01(\x03R\ventityIndex\x1aW\n" +
	"\x10DetectedLanguage\x12#\n" +
	"\rlanguage_code\x18\x01 \x01(\tR\flanguageCode\x12\x1e\n" +
	"\n" +
	"confidence\x18\x02 \x01(\x01R\n" +
	"confidenceBe\n" +
	"\x1dyandex.cloud.api.ai.vision.v1ZDgithub.com/yandex-cloud/go-genproto/yandex/cloud/ai/vision/v1;visionb\x06proto3"

var (
	file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescOnce sync.Once
	file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescData []byte
)

func file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescGZIP() []byte {
	file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDesc), len(file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDesc)))
	})
	return file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDescData
}

var file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_yandex_cloud_ai_vision_v1_text_detection_proto_goTypes = []any{
	(*TextAnnotation)(nil),        // 0: yandex.cloud.ai.vision.v1.TextAnnotation
	(*Page)(nil),                  // 1: yandex.cloud.ai.vision.v1.Page
	(*Entity)(nil),                // 2: yandex.cloud.ai.vision.v1.Entity
	(*Block)(nil),                 // 3: yandex.cloud.ai.vision.v1.Block
	(*Line)(nil),                  // 4: yandex.cloud.ai.vision.v1.Line
	(*Word)(nil),                  // 5: yandex.cloud.ai.vision.v1.Word
	(*Word_DetectedLanguage)(nil), // 6: yandex.cloud.ai.vision.v1.Word.DetectedLanguage
	(*Polygon)(nil),               // 7: yandex.cloud.ai.vision.v1.Polygon
}
var file_yandex_cloud_ai_vision_v1_text_detection_proto_depIdxs = []int32{
	1, // 0: yandex.cloud.ai.vision.v1.TextAnnotation.pages:type_name -> yandex.cloud.ai.vision.v1.Page
	3, // 1: yandex.cloud.ai.vision.v1.Page.blocks:type_name -> yandex.cloud.ai.vision.v1.Block
	2, // 2: yandex.cloud.ai.vision.v1.Page.entities:type_name -> yandex.cloud.ai.vision.v1.Entity
	7, // 3: yandex.cloud.ai.vision.v1.Block.bounding_box:type_name -> yandex.cloud.ai.vision.v1.Polygon
	4, // 4: yandex.cloud.ai.vision.v1.Block.lines:type_name -> yandex.cloud.ai.vision.v1.Line
	7, // 5: yandex.cloud.ai.vision.v1.Line.bounding_box:type_name -> yandex.cloud.ai.vision.v1.Polygon
	5, // 6: yandex.cloud.ai.vision.v1.Line.words:type_name -> yandex.cloud.ai.vision.v1.Word
	7, // 7: yandex.cloud.ai.vision.v1.Word.bounding_box:type_name -> yandex.cloud.ai.vision.v1.Polygon
	6, // 8: yandex.cloud.ai.vision.v1.Word.languages:type_name -> yandex.cloud.ai.vision.v1.Word.DetectedLanguage
	9, // [9:9] is the sub-list for method output_type
	9, // [9:9] is the sub-list for method input_type
	9, // [9:9] is the sub-list for extension type_name
	9, // [9:9] is the sub-list for extension extendee
	0, // [0:9] is the sub-list for field type_name
}

func init() { file_yandex_cloud_ai_vision_v1_text_detection_proto_init() }
func file_yandex_cloud_ai_vision_v1_text_detection_proto_init() {
	if File_yandex_cloud_ai_vision_v1_text_detection_proto != nil {
		return
	}
	file_yandex_cloud_ai_vision_v1_primitives_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDesc), len(file_yandex_cloud_ai_vision_v1_text_detection_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   7,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_ai_vision_v1_text_detection_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_ai_vision_v1_text_detection_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_ai_vision_v1_text_detection_proto_msgTypes,
	}.Build()
	File_yandex_cloud_ai_vision_v1_text_detection_proto = out.File
	file_yandex_cloud_ai_vision_v1_text_detection_proto_goTypes = nil
	file_yandex_cloud_ai_vision_v1_text_detection_proto_depIdxs = nil
}
