xref: /aosp_15_r20/external/googleapis/google/cloud/documentai/v1/operation_metadata.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.documentai.v1;
18
19import "google/protobuf/timestamp.proto";
20
21option csharp_namespace = "Google.Cloud.DocumentAI.V1";
22option go_package = "cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb";
23option java_multiple_files = true;
24option java_outer_classname = "OperationMetadataProto";
25option java_package = "com.google.cloud.documentai.v1";
26option php_namespace = "Google\\Cloud\\DocumentAI\\V1";
27option ruby_package = "Google::Cloud::DocumentAI::V1";
28
29// The common metadata for long running operations.
30message CommonOperationMetadata {
31  // State of the longrunning operation.
32  enum State {
33    // Unspecified state.
34    STATE_UNSPECIFIED = 0;
35
36    // Operation is still running.
37    RUNNING = 1;
38
39    // Operation is being cancelled.
40    CANCELLING = 2;
41
42    // Operation succeeded.
43    SUCCEEDED = 3;
44
45    // Operation failed.
46    FAILED = 4;
47
48    // Operation is cancelled.
49    CANCELLED = 5;
50  }
51
52  // The state of the operation.
53  State state = 1;
54
55  // A message providing more details about the current state of processing.
56  string state_message = 2;
57
58  // A related resource to this operation.
59  string resource = 5;
60
61  // The creation time of the operation.
62  google.protobuf.Timestamp create_time = 3;
63
64  // The last update time of the operation.
65  google.protobuf.Timestamp update_time = 4;
66}
67