// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v3.21.12 // source: thumbnail.proto package proto import ( _ "google.golang.org/genproto/googleapis/api/annotations" 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) ) // Enum representing the supported file types for processing. type FileType int32 const ( FileType_FILE_TYPE_UNSPECIFIED FileType = 0 // Default value when file type is not specified. FileType_IMAGE FileType = 1 // Represents an image file type. FileType_VIDEO FileType = 2 // Represents a video file type. FileType_PDF FileType = 3 // Represents a PDF file type. ) // Enum value maps for FileType. var ( FileType_name = map[int32]string{ 0: "FILE_TYPE_UNSPECIFIED", 1: "IMAGE", 2: "VIDEO", 3: "PDF", } FileType_value = map[string]int32{ "FILE_TYPE_UNSPECIFIED": 0, "IMAGE": 1, "VIDEO": 2, "PDF": 3, } ) func (x FileType) Enum() *FileType { p := new(FileType) *p = x return p } func (x FileType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FileType) Descriptor() protoreflect.EnumDescriptor { return file_thumbnail_proto_enumTypes[0].Descriptor() } func (FileType) Type() protoreflect.EnumType { return &file_thumbnail_proto_enumTypes[0] } func (x FileType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use FileType.Descriptor instead. func (FileType) EnumDescriptor() ([]byte, []int) { return file_thumbnail_proto_rawDescGZIP(), []int{0} } // Request message for thumbnail generation. // // The file_content must be a base64-encoded file (image, video, or PDF). // Optional max_width and max_height can be provided to resize the thumbnail // (values of 0 mean no resizing constraints). type ThumbnailRequest struct { state protoimpl.MessageState `protogen:"open.v1"` FileContent []byte `protobuf:"bytes,1,opt,name=file_content,json=fileContent,proto3" json:"file_content,omitempty"` // Base64-encoded bytes of the file to process. FileType FileType `protobuf:"varint,2,opt,name=file_type,json=fileType,proto3,enum=thumbnail_service.FileType" json:"file_type,omitempty"` // Specifies the type of the file. MaxWidth int32 `protobuf:"varint,3,opt,name=max_width,json=maxWidth,proto3" json:"max_width,omitempty"` // Maximum width of the generated thumbnail; 0 means no limit. MaxHeight int32 `protobuf:"varint,4,opt,name=max_height,json=maxHeight,proto3" json:"max_height,omitempty"` // Maximum height of the generated thumbnail; 0 means no limit. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ThumbnailRequest) Reset() { *x = ThumbnailRequest{} mi := &file_thumbnail_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ThumbnailRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ThumbnailRequest) ProtoMessage() {} func (x *ThumbnailRequest) ProtoReflect() protoreflect.Message { mi := &file_thumbnail_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 ThumbnailRequest.ProtoReflect.Descriptor instead. func (*ThumbnailRequest) Descriptor() ([]byte, []int) { return file_thumbnail_proto_rawDescGZIP(), []int{0} } func (x *ThumbnailRequest) GetFileContent() []byte { if x != nil { return x.FileContent } return nil } func (x *ThumbnailRequest) GetFileType() FileType { if x != nil { return x.FileType } return FileType_FILE_TYPE_UNSPECIFIED } func (x *ThumbnailRequest) GetMaxWidth() int32 { if x != nil { return x.MaxWidth } return 0 } func (x *ThumbnailRequest) GetMaxHeight() int32 { if x != nil { return x.MaxHeight } return 0 } // Response message for thumbnail generation. // // Contains a status message and the generated thumbnail as base64-encoded bytes. type ThumbnailResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Status or informational message about the thumbnail generation. ThumbnailContent []byte `protobuf:"bytes,2,opt,name=thumbnail_content,json=thumbnailContent,proto3" json:"thumbnail_content,omitempty"` // Base64-encoded bytes of the generated thumbnail image. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ThumbnailResponse) Reset() { *x = ThumbnailResponse{} mi := &file_thumbnail_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ThumbnailResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ThumbnailResponse) ProtoMessage() {} func (x *ThumbnailResponse) ProtoReflect() protoreflect.Message { mi := &file_thumbnail_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 ThumbnailResponse.ProtoReflect.Descriptor instead. func (*ThumbnailResponse) Descriptor() ([]byte, []int) { return file_thumbnail_proto_rawDescGZIP(), []int{1} } func (x *ThumbnailResponse) GetMessage() string { if x != nil { return x.Message } return "" } func (x *ThumbnailResponse) GetThumbnailContent() []byte { if x != nil { return x.ThumbnailContent } return nil } // Request message for OCR processing. // // The file_content must be a base64-encoded file. // The cleanUp flag indicates if whitespace normalization and character cleanup // should be applied to the extracted text. type OCRFileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` FileContent []byte `protobuf:"bytes,1,opt,name=file_content,json=fileContent,proto3" json:"file_content,omitempty"` // Base64-encoded bytes of the file to OCR. FileType FileType `protobuf:"varint,2,opt,name=file_type,json=fileType,proto3,enum=thumbnail_service.FileType" json:"file_type,omitempty"` // Type of the file for future extensibility. CleanUp bool `protobuf:"varint,3,opt,name=cleanUp,proto3" json:"cleanUp,omitempty"` // Whether to normalize whitespace and remove unnecessary characters. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OCRFileRequest) Reset() { *x = OCRFileRequest{} mi := &file_thumbnail_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *OCRFileRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*OCRFileRequest) ProtoMessage() {} func (x *OCRFileRequest) ProtoReflect() protoreflect.Message { mi := &file_thumbnail_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 OCRFileRequest.ProtoReflect.Descriptor instead. func (*OCRFileRequest) Descriptor() ([]byte, []int) { return file_thumbnail_proto_rawDescGZIP(), []int{2} } func (x *OCRFileRequest) GetFileContent() []byte { if x != nil { return x.FileContent } return nil } func (x *OCRFileRequest) GetFileType() FileType { if x != nil { return x.FileType } return FileType_FILE_TYPE_UNSPECIFIED } func (x *OCRFileRequest) GetCleanUp() bool { if x != nil { return x.CleanUp } return false } // Response message for OCR processing. // // Contains a status message, the OCRed file content as bytes, and // the extracted text content as a string. type OCRFileResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Status message about the OCR operation. OcrContent []byte `protobuf:"bytes,2,opt,name=ocr_content,json=ocrContent,proto3" json:"ocr_content,omitempty"` // Base64-encoded bytes of the OCR processed file. TextContent string `protobuf:"bytes,3,opt,name=text_content,json=textContent,proto3" json:"text_content,omitempty"` // Extracted text content from the file. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *OCRFileResponse) Reset() { *x = OCRFileResponse{} mi := &file_thumbnail_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *OCRFileResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*OCRFileResponse) ProtoMessage() {} func (x *OCRFileResponse) ProtoReflect() protoreflect.Message { mi := &file_thumbnail_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 OCRFileResponse.ProtoReflect.Descriptor instead. func (*OCRFileResponse) Descriptor() ([]byte, []int) { return file_thumbnail_proto_rawDescGZIP(), []int{3} } func (x *OCRFileResponse) GetMessage() string { if x != nil { return x.Message } return "" } func (x *OCRFileResponse) GetOcrContent() []byte { if x != nil { return x.OcrContent } return nil } func (x *OCRFileResponse) GetTextContent() string { if x != nil { return x.TextContent } return "" } var File_thumbnail_proto protoreflect.FileDescriptor const file_thumbnail_proto_rawDesc = "" + "\n" + "\x0fthumbnail.proto\x12\x11thumbnail_service\x1a\x1cgoogle/api/annotations.proto\"\xab\x01\n" + "\x10ThumbnailRequest\x12!\n" + "\ffile_content\x18\x01 \x01(\fR\vfileContent\x128\n" + "\tfile_type\x18\x02 \x01(\x0e2\x1b.thumbnail_service.FileTypeR\bfileType\x12\x1b\n" + "\tmax_width\x18\x03 \x01(\x05R\bmaxWidth\x12\x1d\n" + "\n" + "max_height\x18\x04 \x01(\x05R\tmaxHeight\"Z\n" + "\x11ThumbnailResponse\x12\x18\n" + "\amessage\x18\x01 \x01(\tR\amessage\x12+\n" + "\x11thumbnail_content\x18\x02 \x01(\fR\x10thumbnailContent\"\x87\x01\n" + "\x0eOCRFileRequest\x12!\n" + "\ffile_content\x18\x01 \x01(\fR\vfileContent\x128\n" + "\tfile_type\x18\x02 \x01(\x0e2\x1b.thumbnail_service.FileTypeR\bfileType\x12\x18\n" + "\acleanUp\x18\x03 \x01(\bR\acleanUp\"o\n" + "\x0fOCRFileResponse\x12\x18\n" + "\amessage\x18\x01 \x01(\tR\amessage\x12\x1f\n" + "\vocr_content\x18\x02 \x01(\fR\n" + "ocrContent\x12!\n" + "\ftext_content\x18\x03 \x01(\tR\vtextContent*D\n" + "\bFileType\x12\x19\n" + "\x15FILE_TYPE_UNSPECIFIED\x10\x00\x12\t\n" + "\x05IMAGE\x10\x01\x12\t\n" + "\x05VIDEO\x10\x02\x12\a\n" + "\x03PDF\x10\x032\xf2\x01\n" + "\x10ThumbnailService\x12x\n" + "\x11GenerateThumbnail\x12#.thumbnail_service.ThumbnailRequest\x1a$.thumbnail_service.ThumbnailResponse\"\x18\x82\xd3\xe4\x93\x02\x12:\x01*\"\r/v1/thumbnail\x12d\n" + "\aOcrFile\x12!.thumbnail_service.OCRFileRequest\x1a\".thumbnail_service.OCRFileResponse\"\x12\x82\xd3\xe4\x93\x02\f:\x01*\"\a/v1/ocrB\tZ\a./protob\x06proto3" var ( file_thumbnail_proto_rawDescOnce sync.Once file_thumbnail_proto_rawDescData []byte ) func file_thumbnail_proto_rawDescGZIP() []byte { file_thumbnail_proto_rawDescOnce.Do(func() { file_thumbnail_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_thumbnail_proto_rawDesc), len(file_thumbnail_proto_rawDesc))) }) return file_thumbnail_proto_rawDescData } var file_thumbnail_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_thumbnail_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_thumbnail_proto_goTypes = []any{ (FileType)(0), // 0: thumbnail_service.FileType (*ThumbnailRequest)(nil), // 1: thumbnail_service.ThumbnailRequest (*ThumbnailResponse)(nil), // 2: thumbnail_service.ThumbnailResponse (*OCRFileRequest)(nil), // 3: thumbnail_service.OCRFileRequest (*OCRFileResponse)(nil), // 4: thumbnail_service.OCRFileResponse } var file_thumbnail_proto_depIdxs = []int32{ 0, // 0: thumbnail_service.ThumbnailRequest.file_type:type_name -> thumbnail_service.FileType 0, // 1: thumbnail_service.OCRFileRequest.file_type:type_name -> thumbnail_service.FileType 1, // 2: thumbnail_service.ThumbnailService.GenerateThumbnail:input_type -> thumbnail_service.ThumbnailRequest 3, // 3: thumbnail_service.ThumbnailService.OcrFile:input_type -> thumbnail_service.OCRFileRequest 2, // 4: thumbnail_service.ThumbnailService.GenerateThumbnail:output_type -> thumbnail_service.ThumbnailResponse 4, // 5: thumbnail_service.ThumbnailService.OcrFile:output_type -> thumbnail_service.OCRFileResponse 4, // [4:6] is the sub-list for method output_type 2, // [2:4] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_thumbnail_proto_init() } func file_thumbnail_proto_init() { if File_thumbnail_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_thumbnail_proto_rawDesc), len(file_thumbnail_proto_rawDesc)), NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_thumbnail_proto_goTypes, DependencyIndexes: file_thumbnail_proto_depIdxs, EnumInfos: file_thumbnail_proto_enumTypes, MessageInfos: file_thumbnail_proto_msgTypes, }.Build() File_thumbnail_proto = out.File file_thumbnail_proto_goTypes = nil file_thumbnail_proto_depIdxs = nil }