|
| 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.v1", 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_v1.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)) |
0 commit comments