@@ -1057,6 +1057,69 @@ class DeleteCatalogResponse(google.protobuf.message.Message):
10571057
10581058global___DeleteCatalogResponse = DeleteCatalogResponse
10591059
1060+ @typing_extensions .final
1061+ class FilePosition (google .protobuf .message .Message ):
1062+ """FilePosition represents a position within a file using a specific unit.
1063+ The position can be multi-dimensional based on the unit type:
1064+ - 1 element for 1D positions (characters, pages, time)
1065+ - 2 elements for 2D positions (pixels: [x, y])
1066+ - N elements for N-dimensional positions
1067+ """
1068+
1069+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
1070+
1071+ class _Unit :
1072+ ValueType = typing .NewType ("ValueType" , builtins .int )
1073+ V : typing_extensions .TypeAlias = ValueType
1074+
1075+ class _UnitEnumTypeWrapper (google .protobuf .internal .enum_type_wrapper ._EnumTypeWrapper [FilePosition ._Unit .ValueType ], builtins .type ):
1076+ DESCRIPTOR : google .protobuf .descriptor .EnumDescriptor
1077+ UNIT_UNSPECIFIED : FilePosition ._Unit .ValueType # 0
1078+ """Unspecified."""
1079+ UNIT_CHARACTER : FilePosition ._Unit .ValueType # 1
1080+ """Character positions (for Markdown and other text files)."""
1081+ UNIT_PAGE : FilePosition ._Unit .ValueType # 2
1082+ """Page positions (for documents)."""
1083+ UNIT_TIME_MS : FilePosition ._Unit .ValueType # 3
1084+ """Time positions in milliseconds (for audio/video files)."""
1085+ UNIT_PIXEL : FilePosition ._Unit .ValueType # 4
1086+ """Pixel positions (for images and other 2D content)."""
1087+
1088+ class Unit (_Unit , metaclass = _UnitEnumTypeWrapper ):
1089+ """Unit describes the unit of measurement for a position within a file."""
1090+
1091+ UNIT_UNSPECIFIED : FilePosition .Unit .ValueType # 0
1092+ """Unspecified."""
1093+ UNIT_CHARACTER : FilePosition .Unit .ValueType # 1
1094+ """Character positions (for Markdown and other text files)."""
1095+ UNIT_PAGE : FilePosition .Unit .ValueType # 2
1096+ """Page positions (for documents)."""
1097+ UNIT_TIME_MS : FilePosition .Unit .ValueType # 3
1098+ """Time positions in milliseconds (for audio/video files)."""
1099+ UNIT_PIXEL : FilePosition .Unit .ValueType # 4
1100+ """Pixel positions (for images and other 2D content)."""
1101+
1102+ UNIT_FIELD_NUMBER : builtins .int
1103+ COORDINATES_FIELD_NUMBER : builtins .int
1104+ unit : global___FilePosition .Unit .ValueType
1105+ """Unit of measurement for the position"""
1106+ @property
1107+ def coordinates (self ) -> google .protobuf .internal .containers .RepeatedScalarFieldContainer [builtins .int ]:
1108+ """Position coordinates as an array
1109+ For 1D: [position]
1110+ For 2D: [x, y]
1111+ For 3D: [x, y, z], etc.
1112+ """
1113+ def __init__ (
1114+ self ,
1115+ * ,
1116+ unit : global___FilePosition .Unit .ValueType = ...,
1117+ coordinates : collections .abc .Iterable [builtins .int ] | None = ...,
1118+ ) -> None : ...
1119+ def ClearField (self , field_name : typing_extensions .Literal ["coordinates" , b"coordinates" , "unit" , b"unit" ]) -> None : ...
1120+
1121+ global___FilePosition = FilePosition
1122+
10601123@typing_extensions .final
10611124class File (google .protobuf .message .Message ):
10621125 """file"""
@@ -1084,6 +1147,7 @@ class File(google.protobuf.message.Message):
10841147 SUMMARY_FIELD_NUMBER : builtins .int
10851148 DOWNLOAD_URL_FIELD_NUMBER : builtins .int
10861149 CONVERTING_PIPELINE_FIELD_NUMBER : builtins .int
1150+ LENGTH_FIELD_NUMBER : builtins .int
10871151 file_uid : builtins .str
10881152 """file uid"""
10891153 name : builtins .str
@@ -1159,6 +1223,12 @@ class File(google.protobuf.message.Message):
11591223 (such files are typically trivial to convert and don't require a dedicated
11601224 pipeline to improve the conversion performance).
11611225 """
1226+ @property
1227+ def length (self ) -> global___FilePosition :
1228+ """Length of the file in the specified unit type. It is defined as a
1229+ FilePosition, so it reflects the number of positions (the unit will depend
1230+ on the file type) that can be accessed in the file.
1231+ """
11621232 def __init__ (
11631233 self ,
11641234 * ,
@@ -1183,9 +1253,10 @@ class File(google.protobuf.message.Message):
11831253 summary : builtins .str = ...,
11841254 download_url : builtins .str = ...,
11851255 converting_pipeline : builtins .str | None = ...,
1256+ length : global___FilePosition | None = ...,
11861257 ) -> None : ...
1187- def HasField (self , field_name : typing_extensions .Literal ["_converting_pipeline" , b"_converting_pipeline" , "_external_metadata" , b"_external_metadata" , "converting_pipeline" , b"converting_pipeline" , "create_time" , b"create_time" , "delete_time" , b"delete_time" , "external_metadata" , b"external_metadata" , "update_time" , b"update_time" ]) -> builtins .bool : ...
1188- def ClearField (self , field_name : typing_extensions .Literal ["_converting_pipeline" , b"_converting_pipeline" , "_external_metadata" , b"_external_metadata" , "catalog_uid" , b"catalog_uid" , "content" , b"content" , "converting_pipeline" , b"converting_pipeline" , "create_time" , b"create_time" , "creator_uid" , b"creator_uid" , "delete_time" , b"delete_time" , "download_url" , b"download_url" , "external_metadata" , b"external_metadata" , "file_uid" , b"file_uid" , "name" , b"name" , "object_uid" , b"object_uid" , "owner_uid" , b"owner_uid" , "process_outcome" , b"process_outcome" , "process_status" , b"process_status" , "retrievable" , b"retrievable" , "size" , b"size" , "summary" , b"summary" , "total_chunks" , b"total_chunks" , "total_tokens" , b"total_tokens" , "type" , b"type" , "update_time" , b"update_time" ]) -> None : ...
1258+ def HasField (self , field_name : typing_extensions .Literal ["_converting_pipeline" , b"_converting_pipeline" , "_external_metadata" , b"_external_metadata" , "converting_pipeline" , b"converting_pipeline" , "create_time" , b"create_time" , "delete_time" , b"delete_time" , "external_metadata" , b"external_metadata" , "length" , b"length" , " update_time" , b"update_time" ]) -> builtins .bool : ...
1259+ def ClearField (self , field_name : typing_extensions .Literal ["_converting_pipeline" , b"_converting_pipeline" , "_external_metadata" , b"_external_metadata" , "catalog_uid" , b"catalog_uid" , "content" , b"content" , "converting_pipeline" , b"converting_pipeline" , "create_time" , b"create_time" , "creator_uid" , b"creator_uid" , "delete_time" , b"delete_time" , "download_url" , b"download_url" , "external_metadata" , b"external_metadata" , "file_uid" , b"file_uid" , "length" , b"length" , " name" , b"name" , "object_uid" , b"object_uid" , "owner_uid" , b"owner_uid" , "process_outcome" , b"process_outcome" , "process_status" , b"process_status" , "retrievable" , b"retrievable" , "size" , b"size" , "summary" , b"summary" , "total_chunks" , b"total_chunks" , "total_tokens" , b"total_tokens" , "type" , b"type" , "update_time" , b"update_time" ]) -> None : ...
11891260 @typing .overload
11901261 def WhichOneof (self , oneof_group : typing_extensions .Literal ["_converting_pipeline" , b"_converting_pipeline" ]) -> typing_extensions .Literal ["converting_pipeline" ] | None : ...
11911262 @typing .overload
0 commit comments