google-cloud-document_ai-v1 0.2.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +1490 -58
  4. data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +3 -0
  5. data/lib/google/cloud/document_ai/v1/document_processor_service/paths.rb +38 -0
  6. data/lib/google/cloud/document_ai/v1/version.rb +1 -1
  7. data/lib/google/cloud/document_ai/v1.rb +2 -0
  8. data/lib/google/cloud/documentai/v1/barcode_pb.rb +24 -0
  9. data/lib/google/cloud/documentai/v1/document_io_pb.rb +0 -1
  10. data/lib/google/cloud/documentai/v1/document_pb.rb +20 -2
  11. data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +142 -1
  12. data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +34 -0
  13. data/lib/google/cloud/documentai/v1/document_schema_pb.rb +60 -0
  14. data/lib/google/cloud/documentai/v1/geometry_pb.rb +0 -1
  15. data/lib/google/cloud/documentai/v1/operation_metadata_pb.rb +3 -2
  16. data/lib/google/cloud/documentai/v1/processor_pb.rb +71 -0
  17. data/lib/google/cloud/documentai/v1/processor_type_pb.rb +34 -0
  18. data/proto_docs/google/api/launch_stage.rb +71 -0
  19. data/proto_docs/google/cloud/documentai/v1/barcode.rb +71 -0
  20. data/proto_docs/google/cloud/documentai/v1/document.rb +87 -31
  21. data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +354 -5
  22. data/proto_docs/google/cloud/documentai/v1/document_schema.rb +154 -0
  23. data/proto_docs/google/cloud/documentai/v1/operation_metadata.rb +3 -0
  24. data/proto_docs/google/cloud/documentai/v1/processor.rb +171 -0
  25. data/proto_docs/google/cloud/documentai/v1/processor_type.rb +62 -0
  26. data/proto_docs/google/protobuf/any.rb +3 -3
  27. data/proto_docs/google/protobuf/empty.rb +0 -2
  28. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  29. metadata +41 -12
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -43,6 +43,23 @@ module Google
43
43
  "projects/#{project}/locations/#{location}/processors/#{processor}/humanReviewConfig"
44
44
  end
45
45
 
46
+ ##
47
+ # Create a fully-qualified Location resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ #
56
+ # @return [::String]
57
+ def location_path project:, location:
58
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
59
+
60
+ "projects/#{project}/locations/#{location}"
61
+ end
62
+
46
63
  ##
47
64
  # Create a fully-qualified Processor resource string.
48
65
  #
@@ -62,6 +79,27 @@ module Google
62
79
  "projects/#{project}/locations/#{location}/processors/#{processor}"
63
80
  end
64
81
 
82
+ ##
83
+ # Create a fully-qualified ProcessorVersion resource string.
84
+ #
85
+ # The resource will be in the following format:
86
+ #
87
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
88
+ #
89
+ # @param project [String]
90
+ # @param location [String]
91
+ # @param processor [String]
92
+ # @param processor_version [String]
93
+ #
94
+ # @return [::String]
95
+ def processor_version_path project:, location:, processor:, processor_version:
96
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
97
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
98
+ raise ::ArgumentError, "processor cannot contain /" if processor.to_s.include? "/"
99
+
100
+ "projects/#{project}/locations/#{location}/processors/#{processor}/processorVersions/#{processor_version}"
101
+ end
102
+
65
103
  extend self
66
104
  end
67
105
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DocumentAI
23
23
  module V1
24
- VERSION = "0.2.4"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/document_ai/v1"
29
31
  # client = ::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client.new
30
32
  #
@@ -0,0 +1,24 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/documentai/v1/barcode.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("google/cloud/documentai/v1/barcode.proto", :syntax => :proto3) do
8
+ add_message "google.cloud.documentai.v1.Barcode" do
9
+ optional :format, :string, 1
10
+ optional :value_format, :string, 2
11
+ optional :raw_value, :string, 3
12
+ end
13
+ end
14
+ end
15
+
16
+ module Google
17
+ module Cloud
18
+ module DocumentAI
19
+ module V1
20
+ Barcode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Barcode").msgclass
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document_io.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/protobuf'
6
5
 
7
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,7 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/cloud/documentai/v1/barcode_pb'
5
8
  require 'google/cloud/documentai/v1/geometry_pb'
6
9
  require 'google/protobuf/timestamp_pb'
7
10
  require 'google/rpc/status_pb'
@@ -10,8 +13,6 @@ require 'google/type/date_pb'
10
13
  require 'google/type/datetime_pb'
11
14
  require 'google/type/money_pb'
12
15
  require 'google/type/postal_address_pb'
13
- require 'google/api/annotations_pb'
14
- require 'google/protobuf'
15
16
 
16
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  add_file("google/cloud/documentai/v1/document.proto", :syntax => :proto3) do
@@ -63,6 +64,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
64
  repeated :visual_elements, :message, 9, "google.cloud.documentai.v1.Document.Page.VisualElement"
64
65
  repeated :tables, :message, 10, "google.cloud.documentai.v1.Document.Page.Table"
65
66
  repeated :form_fields, :message, 11, "google.cloud.documentai.v1.Document.Page.FormField"
67
+ repeated :symbols, :message, 12, "google.cloud.documentai.v1.Document.Page.Symbol"
68
+ repeated :detected_barcodes, :message, 15, "google.cloud.documentai.v1.Document.Page.DetectedBarcode"
66
69
  optional :provenance, :message, 16, "google.cloud.documentai.v1.Document.Provenance"
67
70
  end
68
71
  add_message "google.cloud.documentai.v1.Document.Page.Dimension" do
@@ -125,6 +128,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
125
128
  value :WIDE_SPACE, 2
126
129
  value :HYPHEN, 3
127
130
  end
131
+ add_message "google.cloud.documentai.v1.Document.Page.Symbol" do
132
+ optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
133
+ repeated :detected_languages, :message, 2, "google.cloud.documentai.v1.Document.Page.DetectedLanguage"
134
+ end
128
135
  add_message "google.cloud.documentai.v1.Document.Page.VisualElement" do
129
136
  optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
130
137
  optional :type, :string, 2
@@ -151,8 +158,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
151
158
  repeated :name_detected_languages, :message, 3, "google.cloud.documentai.v1.Document.Page.DetectedLanguage"
152
159
  repeated :value_detected_languages, :message, 4, "google.cloud.documentai.v1.Document.Page.DetectedLanguage"
153
160
  optional :value_type, :string, 5
161
+ optional :corrected_key_text, :string, 6
162
+ optional :corrected_value_text, :string, 7
154
163
  optional :provenance, :message, 8, "google.cloud.documentai.v1.Document.Provenance"
155
164
  end
165
+ add_message "google.cloud.documentai.v1.Document.Page.DetectedBarcode" do
166
+ optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
167
+ optional :barcode, :message, 2, "google.cloud.documentai.v1.Barcode"
168
+ end
156
169
  add_message "google.cloud.documentai.v1.Document.Page.DetectedLanguage" do
157
170
  optional :language_code, :string, 1
158
171
  optional :confidence, :float, 2
@@ -178,6 +191,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
178
191
  optional :datetime_value, :message, 4, "google.type.DateTime"
179
192
  optional :address_value, :message, 5, "google.type.PostalAddress"
180
193
  optional :boolean_value, :bool, 6
194
+ optional :integer_value, :int32, 7
195
+ optional :float_value, :float, 8
181
196
  end
182
197
  end
183
198
  add_message "google.cloud.documentai.v1.Document.EntityRelation" do
@@ -236,6 +251,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
236
251
  add_message "google.cloud.documentai.v1.Document.Revision" do
237
252
  optional :id, :string, 1
238
253
  repeated :parent, :int32, 2
254
+ repeated :parent_ids, :string, 7
239
255
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
240
256
  optional :human_review, :message, 6, "google.cloud.documentai.v1.Document.Revision.HumanReview"
241
257
  oneof :source do
@@ -275,11 +291,13 @@ module Google
275
291
  Document::Page::Token = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token").msgclass
276
292
  Document::Page::Token::DetectedBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token.DetectedBreak").msgclass
277
293
  Document::Page::Token::DetectedBreak::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type").enummodule
294
+ Document::Page::Symbol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Symbol").msgclass
278
295
  Document::Page::VisualElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.VisualElement").msgclass
279
296
  Document::Page::Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table").msgclass
280
297
  Document::Page::Table::TableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table.TableRow").msgclass
281
298
  Document::Page::Table::TableCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table.TableCell").msgclass
282
299
  Document::Page::FormField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.FormField").msgclass
300
+ Document::Page::DetectedBarcode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.DetectedBarcode").msgclass
283
301
  Document::Page::DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.DetectedLanguage").msgclass
284
302
  Document::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Entity").msgclass
285
303
  Document::Entity::NormalizedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Entity.NormalizedValue").msgclass
@@ -1,24 +1,29 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document_processor_service.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
7
9
  require 'google/api/resource_pb'
8
10
  require 'google/cloud/documentai/v1/document_pb'
9
11
  require 'google/cloud/documentai/v1/document_io_pb'
12
+ require 'google/cloud/documentai/v1/document_schema_pb'
10
13
  require 'google/cloud/documentai/v1/operation_metadata_pb'
14
+ require 'google/cloud/documentai/v1/processor_pb'
15
+ require 'google/cloud/documentai/v1/processor_type_pb'
11
16
  require 'google/longrunning/operations_pb'
12
17
  require 'google/protobuf/field_mask_pb'
13
18
  require 'google/protobuf/timestamp_pb'
14
19
  require 'google/rpc/status_pb'
15
- require 'google/protobuf'
16
20
 
17
21
  Google::Protobuf::DescriptorPool.generated_pool.build do
18
22
  add_file("google/cloud/documentai/v1/document_processor_service.proto", :syntax => :proto3) do
19
23
  add_message "google.cloud.documentai.v1.ProcessRequest" do
20
24
  optional :name, :string, 1
21
25
  optional :skip_human_review, :bool, 3
26
+ optional :field_mask, :message, 6, "google.protobuf.FieldMask"
22
27
  oneof :source do
23
28
  optional :inline_document, :message, 4, "google.cloud.documentai.v1.Document"
24
29
  optional :raw_document, :message, 5, "google.cloud.documentai.v1.RawDocument"
@@ -70,10 +75,107 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
70
75
  value :CANCELLED, 5
71
76
  value :FAILED, 6
72
77
  end
78
+ add_message "google.cloud.documentai.v1.FetchProcessorTypesRequest" do
79
+ optional :parent, :string, 1
80
+ end
81
+ add_message "google.cloud.documentai.v1.FetchProcessorTypesResponse" do
82
+ repeated :processor_types, :message, 1, "google.cloud.documentai.v1.ProcessorType"
83
+ end
84
+ add_message "google.cloud.documentai.v1.ListProcessorTypesRequest" do
85
+ optional :parent, :string, 1
86
+ optional :page_size, :int32, 2
87
+ optional :page_token, :string, 3
88
+ end
89
+ add_message "google.cloud.documentai.v1.ListProcessorTypesResponse" do
90
+ repeated :processor_types, :message, 1, "google.cloud.documentai.v1.ProcessorType"
91
+ optional :next_page_token, :string, 2
92
+ end
93
+ add_message "google.cloud.documentai.v1.ListProcessorsRequest" do
94
+ optional :parent, :string, 1
95
+ optional :page_size, :int32, 2
96
+ optional :page_token, :string, 3
97
+ end
98
+ add_message "google.cloud.documentai.v1.ListProcessorsResponse" do
99
+ repeated :processors, :message, 1, "google.cloud.documentai.v1.Processor"
100
+ optional :next_page_token, :string, 2
101
+ end
102
+ add_message "google.cloud.documentai.v1.GetProcessorRequest" do
103
+ optional :name, :string, 1
104
+ end
105
+ add_message "google.cloud.documentai.v1.GetProcessorVersionRequest" do
106
+ optional :name, :string, 1
107
+ end
108
+ add_message "google.cloud.documentai.v1.ListProcessorVersionsRequest" do
109
+ optional :parent, :string, 1
110
+ optional :page_size, :int32, 2
111
+ optional :page_token, :string, 3
112
+ end
113
+ add_message "google.cloud.documentai.v1.ListProcessorVersionsResponse" do
114
+ repeated :processor_versions, :message, 1, "google.cloud.documentai.v1.ProcessorVersion"
115
+ optional :next_page_token, :string, 2
116
+ end
117
+ add_message "google.cloud.documentai.v1.DeleteProcessorVersionRequest" do
118
+ optional :name, :string, 1
119
+ end
120
+ add_message "google.cloud.documentai.v1.DeleteProcessorVersionMetadata" do
121
+ optional :common_metadata, :message, 1, "google.cloud.documentai.v1.CommonOperationMetadata"
122
+ end
123
+ add_message "google.cloud.documentai.v1.DeployProcessorVersionRequest" do
124
+ optional :name, :string, 1
125
+ end
126
+ add_message "google.cloud.documentai.v1.DeployProcessorVersionResponse" do
127
+ end
128
+ add_message "google.cloud.documentai.v1.DeployProcessorVersionMetadata" do
129
+ optional :common_metadata, :message, 1, "google.cloud.documentai.v1.CommonOperationMetadata"
130
+ end
131
+ add_message "google.cloud.documentai.v1.UndeployProcessorVersionRequest" do
132
+ optional :name, :string, 1
133
+ end
134
+ add_message "google.cloud.documentai.v1.UndeployProcessorVersionResponse" do
135
+ end
136
+ add_message "google.cloud.documentai.v1.UndeployProcessorVersionMetadata" do
137
+ optional :common_metadata, :message, 1, "google.cloud.documentai.v1.CommonOperationMetadata"
138
+ end
139
+ add_message "google.cloud.documentai.v1.CreateProcessorRequest" do
140
+ optional :parent, :string, 1
141
+ optional :processor, :message, 2, "google.cloud.documentai.v1.Processor"
142
+ end
143
+ add_message "google.cloud.documentai.v1.DeleteProcessorRequest" do
144
+ optional :name, :string, 1
145
+ end
146
+ add_message "google.cloud.documentai.v1.DeleteProcessorMetadata" do
147
+ optional :common_metadata, :message, 5, "google.cloud.documentai.v1.CommonOperationMetadata"
148
+ end
149
+ add_message "google.cloud.documentai.v1.EnableProcessorRequest" do
150
+ optional :name, :string, 1
151
+ end
152
+ add_message "google.cloud.documentai.v1.EnableProcessorResponse" do
153
+ end
154
+ add_message "google.cloud.documentai.v1.EnableProcessorMetadata" do
155
+ optional :common_metadata, :message, 5, "google.cloud.documentai.v1.CommonOperationMetadata"
156
+ end
157
+ add_message "google.cloud.documentai.v1.DisableProcessorRequest" do
158
+ optional :name, :string, 1
159
+ end
160
+ add_message "google.cloud.documentai.v1.DisableProcessorResponse" do
161
+ end
162
+ add_message "google.cloud.documentai.v1.DisableProcessorMetadata" do
163
+ optional :common_metadata, :message, 5, "google.cloud.documentai.v1.CommonOperationMetadata"
164
+ end
165
+ add_message "google.cloud.documentai.v1.SetDefaultProcessorVersionRequest" do
166
+ optional :processor, :string, 1
167
+ optional :default_processor_version, :string, 2
168
+ end
169
+ add_message "google.cloud.documentai.v1.SetDefaultProcessorVersionResponse" do
170
+ end
171
+ add_message "google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata" do
172
+ optional :common_metadata, :message, 1, "google.cloud.documentai.v1.CommonOperationMetadata"
173
+ end
73
174
  add_message "google.cloud.documentai.v1.ReviewDocumentRequest" do
74
175
  optional :human_review_config, :string, 1
75
176
  optional :enable_schema_validation, :bool, 3
76
177
  optional :priority, :enum, 5, "google.cloud.documentai.v1.ReviewDocumentRequest.Priority"
178
+ optional :document_schema, :message, 6, "google.cloud.documentai.v1.DocumentSchema"
77
179
  oneof :source do
78
180
  optional :inline_document, :message, 4, "google.cloud.documentai.v1.Document"
79
181
  end
@@ -84,9 +186,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
84
186
  end
85
187
  add_message "google.cloud.documentai.v1.ReviewDocumentResponse" do
86
188
  optional :gcs_destination, :string, 1
189
+ optional :state, :enum, 2, "google.cloud.documentai.v1.ReviewDocumentResponse.State"
190
+ optional :rejection_reason, :string, 3
191
+ end
192
+ add_enum "google.cloud.documentai.v1.ReviewDocumentResponse.State" do
193
+ value :STATE_UNSPECIFIED, 0
194
+ value :REJECTED, 1
195
+ value :SUCCEEDED, 2
87
196
  end
88
197
  add_message "google.cloud.documentai.v1.ReviewDocumentOperationMetadata" do
89
198
  optional :common_metadata, :message, 5, "google.cloud.documentai.v1.CommonOperationMetadata"
199
+ optional :question_id, :string, 6
90
200
  end
91
201
  end
92
202
  end
@@ -104,9 +214,40 @@ module Google
104
214
  BatchProcessMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.BatchProcessMetadata").msgclass
105
215
  BatchProcessMetadata::IndividualProcessStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus").msgclass
106
216
  BatchProcessMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.BatchProcessMetadata.State").enummodule
217
+ FetchProcessorTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.FetchProcessorTypesRequest").msgclass
218
+ FetchProcessorTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.FetchProcessorTypesResponse").msgclass
219
+ ListProcessorTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorTypesRequest").msgclass
220
+ ListProcessorTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorTypesResponse").msgclass
221
+ ListProcessorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorsRequest").msgclass
222
+ ListProcessorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorsResponse").msgclass
223
+ GetProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.GetProcessorRequest").msgclass
224
+ GetProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.GetProcessorVersionRequest").msgclass
225
+ ListProcessorVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorVersionsRequest").msgclass
226
+ ListProcessorVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorVersionsResponse").msgclass
227
+ DeleteProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeleteProcessorVersionRequest").msgclass
228
+ DeleteProcessorVersionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeleteProcessorVersionMetadata").msgclass
229
+ DeployProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeployProcessorVersionRequest").msgclass
230
+ DeployProcessorVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeployProcessorVersionResponse").msgclass
231
+ DeployProcessorVersionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeployProcessorVersionMetadata").msgclass
232
+ UndeployProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.UndeployProcessorVersionRequest").msgclass
233
+ UndeployProcessorVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.UndeployProcessorVersionResponse").msgclass
234
+ UndeployProcessorVersionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.UndeployProcessorVersionMetadata").msgclass
235
+ CreateProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.CreateProcessorRequest").msgclass
236
+ DeleteProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeleteProcessorRequest").msgclass
237
+ DeleteProcessorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DeleteProcessorMetadata").msgclass
238
+ EnableProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.EnableProcessorRequest").msgclass
239
+ EnableProcessorResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.EnableProcessorResponse").msgclass
240
+ EnableProcessorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.EnableProcessorMetadata").msgclass
241
+ DisableProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DisableProcessorRequest").msgclass
242
+ DisableProcessorResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DisableProcessorResponse").msgclass
243
+ DisableProcessorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DisableProcessorMetadata").msgclass
244
+ SetDefaultProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.SetDefaultProcessorVersionRequest").msgclass
245
+ SetDefaultProcessorVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.SetDefaultProcessorVersionResponse").msgclass
246
+ SetDefaultProcessorVersionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata").msgclass
107
247
  ReviewDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ReviewDocumentRequest").msgclass
108
248
  ReviewDocumentRequest::Priority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ReviewDocumentRequest.Priority").enummodule
109
249
  ReviewDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ReviewDocumentResponse").msgclass
250
+ ReviewDocumentResponse::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ReviewDocumentResponse.State").enummodule
110
251
  ReviewDocumentOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ReviewDocumentOperationMetadata").msgclass
111
252
  end
112
253
  end
@@ -41,6 +41,40 @@ module Google
41
41
  # LRO endpoint to batch process many documents. The output is written
42
42
  # to Cloud Storage as JSON in the [Document] format.
43
43
  rpc :BatchProcessDocuments, ::Google::Cloud::DocumentAI::V1::BatchProcessRequest, ::Google::Longrunning::Operation
44
+ # Fetches processor types. Note that we do not use ListProcessorTypes here
45
+ # because it is not paginated.
46
+ rpc :FetchProcessorTypes, ::Google::Cloud::DocumentAI::V1::FetchProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse
47
+ # Lists the processor types that exist.
48
+ rpc :ListProcessorTypes, ::Google::Cloud::DocumentAI::V1::ListProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1::ListProcessorTypesResponse
49
+ # Lists all processors which belong to this project.
50
+ rpc :ListProcessors, ::Google::Cloud::DocumentAI::V1::ListProcessorsRequest, ::Google::Cloud::DocumentAI::V1::ListProcessorsResponse
51
+ # Gets a processor detail.
52
+ rpc :GetProcessor, ::Google::Cloud::DocumentAI::V1::GetProcessorRequest, ::Google::Cloud::DocumentAI::V1::Processor
53
+ # Gets a processor version detail.
54
+ rpc :GetProcessorVersion, ::Google::Cloud::DocumentAI::V1::GetProcessorVersionRequest, ::Google::Cloud::DocumentAI::V1::ProcessorVersion
55
+ # Lists all versions of a processor.
56
+ rpc :ListProcessorVersions, ::Google::Cloud::DocumentAI::V1::ListProcessorVersionsRequest, ::Google::Cloud::DocumentAI::V1::ListProcessorVersionsResponse
57
+ # Deletes the processor version, all artifacts under the processor version
58
+ # will be deleted.
59
+ rpc :DeleteProcessorVersion, ::Google::Cloud::DocumentAI::V1::DeleteProcessorVersionRequest, ::Google::Longrunning::Operation
60
+ # Deploys the processor version.
61
+ rpc :DeployProcessorVersion, ::Google::Cloud::DocumentAI::V1::DeployProcessorVersionRequest, ::Google::Longrunning::Operation
62
+ # Undeploys the processor version.
63
+ rpc :UndeployProcessorVersion, ::Google::Cloud::DocumentAI::V1::UndeployProcessorVersionRequest, ::Google::Longrunning::Operation
64
+ # Creates a processor from the type processor that the user chose.
65
+ # The processor will be at "ENABLED" state by default after its creation.
66
+ rpc :CreateProcessor, ::Google::Cloud::DocumentAI::V1::CreateProcessorRequest, ::Google::Cloud::DocumentAI::V1::Processor
67
+ # Deletes the processor, unloads all deployed model artifacts if it was
68
+ # enabled and then deletes all artifacts associated with this processor.
69
+ rpc :DeleteProcessor, ::Google::Cloud::DocumentAI::V1::DeleteProcessorRequest, ::Google::Longrunning::Operation
70
+ # Enables a processor
71
+ rpc :EnableProcessor, ::Google::Cloud::DocumentAI::V1::EnableProcessorRequest, ::Google::Longrunning::Operation
72
+ # Disables a processor
73
+ rpc :DisableProcessor, ::Google::Cloud::DocumentAI::V1::DisableProcessorRequest, ::Google::Longrunning::Operation
74
+ # Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in
75
+ # [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
76
+ # [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
77
+ rpc :SetDefaultProcessorVersion, ::Google::Cloud::DocumentAI::V1::SetDefaultProcessorVersionRequest, ::Google::Longrunning::Operation
44
78
  # Send a document for Human Review. The input document should be processed by
45
79
  # the specified processor.
46
80
  rpc :ReviewDocument, ::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest, ::Google::Longrunning::Operation
@@ -0,0 +1,60 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/documentai/v1/document_schema.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("google/cloud/documentai/v1/document_schema.proto", :syntax => :proto3) do
8
+ add_message "google.cloud.documentai.v1.DocumentSchema" do
9
+ optional :display_name, :string, 1
10
+ optional :description, :string, 2
11
+ repeated :entity_types, :message, 3, "google.cloud.documentai.v1.DocumentSchema.EntityType"
12
+ optional :metadata, :message, 4, "google.cloud.documentai.v1.DocumentSchema.Metadata"
13
+ end
14
+ add_message "google.cloud.documentai.v1.DocumentSchema.EntityType" do
15
+ optional :display_name, :string, 13
16
+ optional :name, :string, 1
17
+ repeated :base_types, :string, 2
18
+ repeated :properties, :message, 6, "google.cloud.documentai.v1.DocumentSchema.EntityType.Property"
19
+ oneof :value_source do
20
+ optional :enum_values, :message, 14, "google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues"
21
+ end
22
+ end
23
+ add_message "google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues" do
24
+ repeated :values, :string, 1
25
+ end
26
+ add_message "google.cloud.documentai.v1.DocumentSchema.EntityType.Property" do
27
+ optional :name, :string, 1
28
+ optional :value_type, :string, 2
29
+ optional :occurrence_type, :enum, 3, "google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType"
30
+ end
31
+ add_enum "google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType" do
32
+ value :OCCURRENCE_TYPE_UNSPECIFIED, 0
33
+ value :OPTIONAL_ONCE, 1
34
+ value :OPTIONAL_MULTIPLE, 2
35
+ value :REQUIRED_ONCE, 3
36
+ value :REQUIRED_MULTIPLE, 4
37
+ end
38
+ add_message "google.cloud.documentai.v1.DocumentSchema.Metadata" do
39
+ optional :document_splitter, :bool, 1
40
+ optional :document_allow_multiple_labels, :bool, 2
41
+ optional :prefixed_naming_on_properties, :bool, 6
42
+ optional :skip_naming_validation, :bool, 7
43
+ end
44
+ end
45
+ end
46
+
47
+ module Google
48
+ module Cloud
49
+ module DocumentAI
50
+ module V1
51
+ DocumentSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema").msgclass
52
+ DocumentSchema::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType").msgclass
53
+ DocumentSchema::EntityType::EnumValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues").msgclass
54
+ DocumentSchema::EntityType::Property = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.Property").msgclass
55
+ DocumentSchema::EntityType::Property::OccurrenceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType").enummodule
56
+ DocumentSchema::Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.DocumentSchema.Metadata").msgclass
57
+ end
58
+ end
59
+ end
60
+ end
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/geometry.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/protobuf'
6
5
 
7
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,15 +1,16 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/operation_metadata.proto
3
3
 
4
- require 'google/protobuf/timestamp_pb'
5
- require 'google/api/annotations_pb'
6
4
  require 'google/protobuf'
7
5
 
6
+ require 'google/protobuf/timestamp_pb'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/documentai/v1/operation_metadata.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.documentai.v1.CommonOperationMetadata" do
11
11
  optional :state, :enum, 1, "google.cloud.documentai.v1.CommonOperationMetadata.State"
12
12
  optional :state_message, :string, 2
13
+ optional :resource, :string, 5
13
14
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
14
15
  optional :update_time, :message, 4, "google.protobuf.Timestamp"
15
16
  end
@@ -0,0 +1,71 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/documentai/v1/processor.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("google/cloud/documentai/v1/processor.proto", :syntax => :proto3) do
12
+ add_message "google.cloud.documentai.v1.ProcessorVersion" do
13
+ optional :name, :string, 1
14
+ optional :display_name, :string, 2
15
+ optional :state, :enum, 6, "google.cloud.documentai.v1.ProcessorVersion.State"
16
+ optional :create_time, :message, 7, "google.protobuf.Timestamp"
17
+ optional :kms_key_name, :string, 9
18
+ optional :kms_key_version_name, :string, 10
19
+ optional :google_managed, :bool, 11
20
+ optional :deprecation_info, :message, 13, "google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo"
21
+ end
22
+ add_message "google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo" do
23
+ optional :deprecation_time, :message, 1, "google.protobuf.Timestamp"
24
+ optional :replacement_processor_version, :string, 2
25
+ end
26
+ add_enum "google.cloud.documentai.v1.ProcessorVersion.State" do
27
+ value :STATE_UNSPECIFIED, 0
28
+ value :DEPLOYED, 1
29
+ value :DEPLOYING, 2
30
+ value :UNDEPLOYED, 3
31
+ value :UNDEPLOYING, 4
32
+ value :CREATING, 5
33
+ value :DELETING, 6
34
+ value :FAILED, 7
35
+ end
36
+ add_message "google.cloud.documentai.v1.Processor" do
37
+ optional :name, :string, 1
38
+ optional :type, :string, 2
39
+ optional :display_name, :string, 3
40
+ optional :state, :enum, 4, "google.cloud.documentai.v1.Processor.State"
41
+ optional :default_processor_version, :string, 9
42
+ optional :process_endpoint, :string, 6
43
+ optional :create_time, :message, 7, "google.protobuf.Timestamp"
44
+ optional :kms_key_name, :string, 8
45
+ end
46
+ add_enum "google.cloud.documentai.v1.Processor.State" do
47
+ value :STATE_UNSPECIFIED, 0
48
+ value :ENABLED, 1
49
+ value :DISABLED, 2
50
+ value :ENABLING, 3
51
+ value :DISABLING, 4
52
+ value :CREATING, 5
53
+ value :FAILED, 6
54
+ value :DELETING, 7
55
+ end
56
+ end
57
+ end
58
+
59
+ module Google
60
+ module Cloud
61
+ module DocumentAI
62
+ module V1
63
+ ProcessorVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ProcessorVersion").msgclass
64
+ ProcessorVersion::DeprecationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo").msgclass
65
+ ProcessorVersion::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ProcessorVersion.State").enummodule
66
+ Processor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Processor").msgclass
67
+ Processor::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Processor.State").enummodule
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,34 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/documentai/v1/processor_type.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/launch_stage_pb'
7
+ require 'google/api/resource_pb'
8
+
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/cloud/documentai/v1/processor_type.proto", :syntax => :proto3) do
11
+ add_message "google.cloud.documentai.v1.ProcessorType" do
12
+ optional :name, :string, 1
13
+ optional :type, :string, 2
14
+ optional :category, :string, 3
15
+ repeated :available_locations, :message, 4, "google.cloud.documentai.v1.ProcessorType.LocationInfo"
16
+ optional :allow_creation, :bool, 6
17
+ optional :launch_stage, :enum, 8, "google.api.LaunchStage"
18
+ end
19
+ add_message "google.cloud.documentai.v1.ProcessorType.LocationInfo" do
20
+ optional :location_id, :string, 1
21
+ end
22
+ end
23
+ end
24
+
25
+ module Google
26
+ module Cloud
27
+ module DocumentAI
28
+ module V1
29
+ ProcessorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ProcessorType").msgclass
30
+ ProcessorType::LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ProcessorType.LocationInfo").msgclass
31
+ end
32
+ end
33
+ end
34
+ end