summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/cloud/documentai/v1beta3/processor.proto
blob: b7019bf4d128bccdd8077bdfa8905d6290a0c930 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.documentai.v1beta3;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta3;documentai";
option java_multiple_files = true;
option java_outer_classname = "DocumentAiProcessor";
option java_package = "com.google.cloud.documentai.v1beta3";
option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";

// A processor version is an implementation of a processor. Each processor
// can have multiple versions, pre-trained by Google internally or up-trained
// by the customer. At a time, a processor can only have one default version
// version. So the processor's behavior (when processing documents) is defined
// by a default version
message ProcessorVersion {
  option (google.api.resource) = {
    type: "documentai.googleapis.com/ProcessorVersion"
    pattern: "projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}"
  };

  // Information about the upcoming deprecation of this processor version.
  message DeprecationInfo {
    // The time at which this processor version will be deprecated.
    google.protobuf.Timestamp deprecation_time = 1;

    // If set, the processor version that will be used as a replacement.
    string replacement_processor_version = 2 [(google.api.resource_reference) = {
                                                type: "documentai.googleapis.com/ProcessorVersion"
                                              }];
  }

  // The possible states of the processor version.
  enum State {
    // The processor version is in an unspecified state.
    STATE_UNSPECIFIED = 0;

    // The processor version is deployed and can be used for processing.
    DEPLOYED = 1;

    // The processor version is being deployed.
    DEPLOYING = 2;

    // The processor version is not deployed and cannot be used for processing.
    UNDEPLOYED = 3;

    // The processor version is being undeployed.
    UNDEPLOYING = 4;

    // The processor version is being created.
    CREATING = 5;

    // The processor version is being deleted.
    DELETING = 6;

    // The processor version failed and is in an indeterminate state.
    FAILED = 7;
  }

  // The resource name of the processor version.
  // Format:
  // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
  string name = 1;

  // The display name of the processor version.
  string display_name = 2;

  // The state of the processor version.
  State state = 6;

  // The time the processor version was created.
  google.protobuf.Timestamp create_time = 7;

  // The KMS key name used for encryption.
  string kms_key_name = 9;

  // The KMS key version with which data is encrypted.
  string kms_key_version_name = 10;

  // Denotes that this ProcessorVersion is managed by google.
  bool google_managed = 11;

  // If set, information about the eventual deprecation of this version.
  DeprecationInfo deprecation_info = 13;
}

// The first-class citizen for Document AI. Each processor defines how to
// extract structural information from a document.
message Processor {
  option (google.api.resource) = {
    type: "documentai.googleapis.com/Processor"
    pattern: "projects/{project}/locations/{location}/processors/{processor}"
  };

  // The possible states of the processor.
  enum State {
    // The processor is in an unspecified state.
    STATE_UNSPECIFIED = 0;

    // The processor is enabled, i.e., has an enabled version which can
    // currently serve processing requests and all the feature dependencies have
    // been successfully initialized.
    ENABLED = 1;

    // The processor is disabled.
    DISABLED = 2;

    // The processor is being enabled, will become ENABLED if successful.
    ENABLING = 3;

    // The processor is being disabled, will become DISABLED if successful.
    DISABLING = 4;

    // The processor is being created, will become either ENABLED (for
    // successful creation) or FAILED (for failed ones).
    // Once a processor is in this state, it can then be used for document
    // processing, but the feature dependencies of the processor might not be
    // fully created yet.
    CREATING = 5;

    // The processor failed during creation or initialization of feature
    // dependencies. The user should delete the processor and recreate one as
    // all the functionalities of the processor are disabled.
    FAILED = 6;

    // The processor is being deleted, will be removed if successful.
    DELETING = 7;
  }

  // Output only. Immutable. The resource name of the processor.
  // Format: `projects/{project}/locations/{location}/processors/{processor}`
  string name = 1 [
    (google.api.field_behavior) = IMMUTABLE,
    (google.api.field_behavior) = OUTPUT_ONLY
  ];

  // The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
  // To get a list of processors types, see
  // [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
  string type = 2;

  // The display name of the processor.
  string display_name = 3;

  // Output only. The state of the processor.
  State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // The default processor version.
  string default_processor_version = 9 [(google.api.resource_reference) = {
                                          type: "documentai.googleapis.com/ProcessorVersion"
                                        }];

  // Output only. Immutable. The http endpoint that can be called to invoke processing.
  string process_endpoint = 6 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.field_behavior) = IMMUTABLE
  ];

  // The time the processor was created.
  google.protobuf.Timestamp create_time = 7;

  // The KMS key used for encryption/decryption in CMEK scenarios.
  // See https://cloud.google.com/security-key-management.
  string kms_key_name = 8;
}