| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e6b470 commit a1a92b2
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,6 @@ | |||
| 2 | 2 | branch = True | |
| 3 | 3 | ||
| 4 | 4 | [report] | |
| 5 | - fail_under = 100 | ||
| 6 | 5 | show_missing = True | |
| 7 | 6 | omit = | |
| 8 | 7 | google/cloud/documentai/__init__.py | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,6 @@ | |||
| 27 | 27 | from .types.document_processor_service import BatchProcessMetadata | |
| 28 | 28 | from .types.document_processor_service import BatchProcessRequest | |
| 29 | 29 | from .types.document_processor_service import BatchProcessResponse | |
| 30 | - from .types.document_processor_service import CommonOperationMetadata | ||
| 31 | 30 | from .types.document_processor_service import HumanReviewStatus | |
| 32 | 31 | from .types.document_processor_service import ProcessRequest | |
| 33 | 32 | from .types.document_processor_service import ProcessResponse | |
@@ -37,6 +36,7 @@ | |||
| 37 | 36 | from .types.geometry import BoundingPoly | |
| 38 | 37 | from .types.geometry import NormalizedVertex | |
| 39 | 38 | from .types.geometry import Vertex | |
| 39 | + from .types.operation_metadata import CommonOperationMetadata | ||
| 40 | 40 | ||
| 41 | 41 | __all__ = ( | |
| 42 | 42 | "DocumentProcessorServiceAsyncClient", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,6 @@ | |||
| 26 | 26 | BatchProcessMetadata, | |
| 27 | 27 | BatchProcessRequest, | |
| 28 | 28 | BatchProcessResponse, | |
| 29 | - CommonOperationMetadata, | ||
| 30 | 29 | HumanReviewStatus, | |
| 31 | 30 | ProcessRequest, | |
| 32 | 31 | ProcessResponse, | |
@@ -39,6 +38,7 @@ | |||
| 39 | 38 | NormalizedVertex, | |
| 40 | 39 | Vertex, | |
| 41 | 40 | ) | |
| 41 | + from .operation_metadata import CommonOperationMetadata | ||
| 42 | 42 | ||
| 43 | 43 | __all__ = ( | |
| 44 | 44 | "Document", | |
@@ -51,7 +51,6 @@ | |||
| 51 | 51 | "BatchProcessMetadata", | |
| 52 | 52 | "BatchProcessRequest", | |
| 53 | 53 | "BatchProcessResponse", | |
| 54 | - "CommonOperationMetadata", | ||
| 55 | 54 | "HumanReviewStatus", | |
| 56 | 55 | "ProcessRequest", | |
| 57 | 56 | "ProcessResponse", | |
@@ -61,4 +60,5 @@ | |||
| 61 | 60 | "BoundingPoly", | |
| 62 | 61 | "NormalizedVertex", | |
| 63 | 62 | "Vertex", | |
| 63 | + "CommonOperationMetadata", | ||
| 64 | 64 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | 18 | from google.cloud.documentai_v1beta3.types import document as gcd_document | |
| 19 | 19 | from google.cloud.documentai_v1beta3.types import document_io | |
| 20 | + from google.cloud.documentai_v1beta3.types import operation_metadata | ||
| 20 | 21 | from google.protobuf import timestamp_pb2 # type: ignore | |
| 21 | 22 | from google.rpc import status_pb2 # type: ignore | |
| 22 | 23 | ||
@@ -33,7 +34,6 @@ | |||
| 33 | 34 | "ReviewDocumentRequest", | |
| 34 | 35 | "ReviewDocumentResponse", | |
| 35 | 36 | "ReviewDocumentOperationMetadata", | |
| 36 | - "CommonOperationMetadata", | ||
| 37 | 37 | }, | |
| 38 | 38 | ) | |
| 39 | 39 | ||
@@ -323,37 +323,8 @@ class State(proto.Enum): | |||
| 323 | 323 | create_time = proto.Field(proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp,) | |
| 324 | 324 | update_time = proto.Field(proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp,) | |
| 325 | 325 | common_metadata = proto.Field( | |
| 326 | - proto.MESSAGE, number=5, message="CommonOperationMetadata", | ||
| 326 | + proto.MESSAGE, number=5, message=operation_metadata.CommonOperationMetadata, | ||
| 327 | 327 | ) | |
| 328 | 328 | ||
| 329 | 329 | ||
| 330 | - class CommonOperationMetadata(proto.Message): | ||
| 331 | - r"""The common metadata for long running operations. | ||
| 332 | - Attributes: | ||
| 333 | - state (google.cloud.documentai_v1beta3.types.CommonOperationMetadata.State): | ||
| 334 | - The state of the operation. | ||
| 335 | - state_message (str): | ||
| 336 | - A message providing more details about the | ||
| 337 | - current state of processing. | ||
| 338 | - create_time (google.protobuf.timestamp_pb2.Timestamp): | ||
| 339 | - The creation time of the operation. | ||
| 340 | - update_time (google.protobuf.timestamp_pb2.Timestamp): | ||
| 341 | - The last update time of the operation. | ||
| 342 | - """ | ||
| 343 | - | ||
| 344 | - class State(proto.Enum): | ||
| 345 | - r"""State of the longrunning operation.""" | ||
| 346 | - STATE_UNSPECIFIED = 0 | ||
| 347 | - RUNNING = 1 | ||
| 348 | - CANCELLING = 2 | ||
| 349 | - SUCCEEDED = 3 | ||
| 350 | - FAILED = 4 | ||
| 351 | - CANCELLED = 5 | ||
| 352 | - | ||
| 353 | - state = proto.Field(proto.ENUM, number=1, enum=State,) | ||
| 354 | - state_message = proto.Field(proto.STRING, number=2,) | ||
| 355 | - create_time = proto.Field(proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp,) | ||
| 356 | - update_time = proto.Field(proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp,) | ||
| 357 | - | ||
| 358 | - | ||
| 359 | 330 | __all__ = tuple(sorted(__protobuf__.manifest)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,8 @@ class Vertex(proto.Message): | |||
| 31 | 31 | x (int): | |
| 32 | 32 | X coordinate. | |
| 33 | 33 | y (int): | |
| 34 | - Y coordinate. | ||
| 34 | + Y coordinate (starts from the top of the | ||
| 35 | + image). | ||
| 35 | 36 | """ | |
| 36 | 37 | ||
| 37 | 38 | x = proto.Field(proto.INT32, number=1,) | |
@@ -47,7 +48,8 @@ class NormalizedVertex(proto.Message): | |||
| 47 | 48 | x (float): | |
| 48 | 49 | X coordinate. | |
| 49 | 50 | y (float): | |
| 50 | - Y coordinate. | ||
| 51 | + Y coordinate (starts from the top of the | ||
| 52 | + image). | ||
| 51 | 53 | """ | |
| 52 | 54 | ||
| 53 | 55 | x = proto.Field(proto.FLOAT, number=1,) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,55 @@ | |||
| 1 | + # -*- coding: utf-8 -*- | ||
| 2 | + # Copyright 2020 Google LLC | ||
| 3 | + # | ||
| 4 | + # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + # you may not use this file except in compliance with the License. | ||
| 6 | + # You may obtain a copy of the License at | ||
| 7 | + # | ||
| 8 | + # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + # | ||
| 10 | + # Unless required by applicable law or agreed to in writing, software | ||
| 11 | + # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + # See the License for the specific language governing permissions and | ||
| 14 | + # limitations under the License. | ||
| 15 | + # | ||
| 16 | + import proto # type: ignore | ||
| 17 | + | ||
| 18 | + from google.protobuf import timestamp_pb2 # type: ignore | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + __protobuf__ = proto.module( | ||
| 22 | + package="google.cloud.documentai.v1beta3", manifest={"CommonOperationMetadata",}, | ||
| 23 | + ) | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + class CommonOperationMetadata(proto.Message): | ||
| 27 | + r"""The common metadata for long running operations. | ||
| 28 | + Attributes: | ||
| 29 | + state (google.cloud.documentai_v1beta3.types.CommonOperationMetadata.State): | ||
| 30 | + The state of the operation. | ||
| 31 | + state_message (str): | ||
| 32 | + A message providing more details about the | ||
| 33 | + current state of processing. | ||
| 34 | + create_time (google.protobuf.timestamp_pb2.Timestamp): | ||
| 35 | + The creation time of the operation. | ||
| 36 | + update_time (google.protobuf.timestamp_pb2.Timestamp): | ||
| 37 | + The last update time of the operation. | ||
| 38 | + """ | ||
| 39 | + | ||
| 40 | + class State(proto.Enum): | ||
| 41 | + r"""State of the longrunning operation.""" | ||
| 42 | + STATE_UNSPECIFIED = 0 | ||
| 43 | + RUNNING = 1 | ||
| 44 | + CANCELLING = 2 | ||
| 45 | + SUCCEEDED = 3 | ||
| 46 | + FAILED = 4 | ||
| 47 | + CANCELLED = 5 | ||
| 48 | + | ||
| 49 | + state = proto.Field(proto.ENUM, number=1, enum=State,) | ||
| 50 | + state_message = proto.Field(proto.STRING, number=2,) | ||
| 51 | + create_time = proto.Field(proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp,) | ||
| 52 | + update_time = proto.Field(proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp,) | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + __all__ = tuple(sorted(__protobuf__.manifest)) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments