/
document_processor_service.pb.go
2100 lines (1893 loc) · 97.7 KB
/
document_processor_service.pb.go
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2021 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.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: google/cloud/documentai/v1beta3/document_processor_service.proto
package documentai
import (
context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
status "google.golang.org/genproto/googleapis/rpc/status"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/fieldmaskpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// The final state of human review on a processed document.
type HumanReviewStatus_State int32
const (
// Human review state is unspecified. Most likely due to an internal error.
HumanReviewStatus_STATE_UNSPECIFIED HumanReviewStatus_State = 0
// Human review is skipped for the document. This can happen because human
// review is not enabled on the processor or the processing request has
// been set to skip this document.
HumanReviewStatus_SKIPPED HumanReviewStatus_State = 1
// Human review validation is triggered and passed, so no review is needed.
HumanReviewStatus_VALIDATION_PASSED HumanReviewStatus_State = 2
// Human review validation is triggered and the document is under review.
HumanReviewStatus_IN_PROGRESS HumanReviewStatus_State = 3
// Some error happened during triggering human review, see the
// [state_message] for details.
HumanReviewStatus_ERROR HumanReviewStatus_State = 4
)
// Enum value maps for HumanReviewStatus_State.
var (
HumanReviewStatus_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "SKIPPED",
2: "VALIDATION_PASSED",
3: "IN_PROGRESS",
4: "ERROR",
}
HumanReviewStatus_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"SKIPPED": 1,
"VALIDATION_PASSED": 2,
"IN_PROGRESS": 3,
"ERROR": 4,
}
)
func (x HumanReviewStatus_State) Enum() *HumanReviewStatus_State {
p := new(HumanReviewStatus_State)
*p = x
return p
}
func (x HumanReviewStatus_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HumanReviewStatus_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[0].Descriptor()
}
func (HumanReviewStatus_State) Type() protoreflect.EnumType {
return &file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[0]
}
func (x HumanReviewStatus_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HumanReviewStatus_State.Descriptor instead.
func (HumanReviewStatus_State) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{1, 0}
}
// Possible states of the batch processing operation.
type BatchProcessMetadata_State int32
const (
// The default value. This value is used if the state is omitted.
BatchProcessMetadata_STATE_UNSPECIFIED BatchProcessMetadata_State = 0
// Request operation is waiting for scheduling.
BatchProcessMetadata_WAITING BatchProcessMetadata_State = 1
// Request is being processed.
BatchProcessMetadata_RUNNING BatchProcessMetadata_State = 2
// The batch processing completed successfully.
BatchProcessMetadata_SUCCEEDED BatchProcessMetadata_State = 3
// The batch processing was being cancelled.
BatchProcessMetadata_CANCELLING BatchProcessMetadata_State = 4
// The batch processing was cancelled.
BatchProcessMetadata_CANCELLED BatchProcessMetadata_State = 5
// The batch processing has failed.
BatchProcessMetadata_FAILED BatchProcessMetadata_State = 6
)
// Enum value maps for BatchProcessMetadata_State.
var (
BatchProcessMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "WAITING",
2: "RUNNING",
3: "SUCCEEDED",
4: "CANCELLING",
5: "CANCELLED",
6: "FAILED",
}
BatchProcessMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"WAITING": 1,
"RUNNING": 2,
"SUCCEEDED": 3,
"CANCELLING": 4,
"CANCELLED": 5,
"FAILED": 6,
}
)
func (x BatchProcessMetadata_State) Enum() *BatchProcessMetadata_State {
p := new(BatchProcessMetadata_State)
*p = x
return p
}
func (x BatchProcessMetadata_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (BatchProcessMetadata_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[1].Descriptor()
}
func (BatchProcessMetadata_State) Type() protoreflect.EnumType {
return &file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[1]
}
func (x BatchProcessMetadata_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use BatchProcessMetadata_State.Descriptor instead.
func (BatchProcessMetadata_State) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{5, 0}
}
// State of the longrunning operation.
type ReviewDocumentOperationMetadata_State int32
const (
// Unspecified state.
ReviewDocumentOperationMetadata_STATE_UNSPECIFIED ReviewDocumentOperationMetadata_State = 0
// Operation is still running.
ReviewDocumentOperationMetadata_RUNNING ReviewDocumentOperationMetadata_State = 1
// Operation is being cancelled.
ReviewDocumentOperationMetadata_CANCELLING ReviewDocumentOperationMetadata_State = 2
// Operation succeeded.
ReviewDocumentOperationMetadata_SUCCEEDED ReviewDocumentOperationMetadata_State = 3
// Operation failed.
ReviewDocumentOperationMetadata_FAILED ReviewDocumentOperationMetadata_State = 4
// Operation is cancelled.
ReviewDocumentOperationMetadata_CANCELLED ReviewDocumentOperationMetadata_State = 5
)
// Enum value maps for ReviewDocumentOperationMetadata_State.
var (
ReviewDocumentOperationMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "CANCELLING",
3: "SUCCEEDED",
4: "FAILED",
5: "CANCELLED",
}
ReviewDocumentOperationMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"CANCELLING": 2,
"SUCCEEDED": 3,
"FAILED": 4,
"CANCELLED": 5,
}
)
func (x ReviewDocumentOperationMetadata_State) Enum() *ReviewDocumentOperationMetadata_State {
p := new(ReviewDocumentOperationMetadata_State)
*p = x
return p
}
func (x ReviewDocumentOperationMetadata_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReviewDocumentOperationMetadata_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[2].Descriptor()
}
func (ReviewDocumentOperationMetadata_State) Type() protoreflect.EnumType {
return &file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[2]
}
func (x ReviewDocumentOperationMetadata_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReviewDocumentOperationMetadata_State.Descriptor instead.
func (ReviewDocumentOperationMetadata_State) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{8, 0}
}
// State of the longrunning operation.
type CommonOperationMetadata_State int32
const (
// Unspecified state.
CommonOperationMetadata_STATE_UNSPECIFIED CommonOperationMetadata_State = 0
// Operation is still running.
CommonOperationMetadata_RUNNING CommonOperationMetadata_State = 1
// Operation is being cancelled.
CommonOperationMetadata_CANCELLING CommonOperationMetadata_State = 2
// Operation succeeded.
CommonOperationMetadata_SUCCEEDED CommonOperationMetadata_State = 3
// Operation failed.
CommonOperationMetadata_FAILED CommonOperationMetadata_State = 4
// Operation is cancelled.
CommonOperationMetadata_CANCELLED CommonOperationMetadata_State = 5
)
// Enum value maps for CommonOperationMetadata_State.
var (
CommonOperationMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "CANCELLING",
3: "SUCCEEDED",
4: "FAILED",
5: "CANCELLED",
}
CommonOperationMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"CANCELLING": 2,
"SUCCEEDED": 3,
"FAILED": 4,
"CANCELLED": 5,
}
)
func (x CommonOperationMetadata_State) Enum() *CommonOperationMetadata_State {
p := new(CommonOperationMetadata_State)
*p = x
return p
}
func (x CommonOperationMetadata_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommonOperationMetadata_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[3].Descriptor()
}
func (CommonOperationMetadata_State) Type() protoreflect.EnumType {
return &file_google_cloud_documentai_v1beta3_document_processor_service_proto_enumTypes[3]
}
func (x CommonOperationMetadata_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommonOperationMetadata_State.Descriptor instead.
func (CommonOperationMetadata_State) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{9, 0}
}
// Request message for the process document method.
type ProcessRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The document payload.
//
// Types that are assignable to Source:
// *ProcessRequest_InlineDocument
// *ProcessRequest_RawDocument
Source isProcessRequest_Source `protobuf_oneof:"source"`
// Required. The processor resource name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The document payload, the [content] and [mime_type] fields must be set.
//
// Deprecated: Do not use.
Document *Document `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"`
// Whether Human Review feature should be skipped for this request. Default to
// false.
SkipHumanReview bool `protobuf:"varint,3,opt,name=skip_human_review,json=skipHumanReview,proto3" json:"skip_human_review,omitempty"`
}
func (x *ProcessRequest) Reset() {
*x = ProcessRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProcessRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProcessRequest) ProtoMessage() {}
func (x *ProcessRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProcessRequest.ProtoReflect.Descriptor instead.
func (*ProcessRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{0}
}
func (m *ProcessRequest) GetSource() isProcessRequest_Source {
if m != nil {
return m.Source
}
return nil
}
func (x *ProcessRequest) GetInlineDocument() *Document {
if x, ok := x.GetSource().(*ProcessRequest_InlineDocument); ok {
return x.InlineDocument
}
return nil
}
func (x *ProcessRequest) GetRawDocument() *RawDocument {
if x, ok := x.GetSource().(*ProcessRequest_RawDocument); ok {
return x.RawDocument
}
return nil
}
func (x *ProcessRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Deprecated: Do not use.
func (x *ProcessRequest) GetDocument() *Document {
if x != nil {
return x.Document
}
return nil
}
func (x *ProcessRequest) GetSkipHumanReview() bool {
if x != nil {
return x.SkipHumanReview
}
return false
}
type isProcessRequest_Source interface {
isProcessRequest_Source()
}
type ProcessRequest_InlineDocument struct {
// An inline document proto.
InlineDocument *Document `protobuf:"bytes,4,opt,name=inline_document,json=inlineDocument,proto3,oneof"`
}
type ProcessRequest_RawDocument struct {
// A raw document content (bytes).
RawDocument *RawDocument `protobuf:"bytes,5,opt,name=raw_document,json=rawDocument,proto3,oneof"`
}
func (*ProcessRequest_InlineDocument) isProcessRequest_Source() {}
func (*ProcessRequest_RawDocument) isProcessRequest_Source() {}
// The status of human review on a processed document.
type HumanReviewStatus struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The state of human review on the processing request.
State HumanReviewStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.documentai.v1beta3.HumanReviewStatus_State" json:"state,omitempty"`
// A message providing more details about the human review state.
StateMessage string `protobuf:"bytes,2,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
// The name of the operation triggered by the processed document. This field
// is populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has
// the same response type and metadata as the long running operation returned
// by [ReviewDocument] method.
HumanReviewOperation string `protobuf:"bytes,3,opt,name=human_review_operation,json=humanReviewOperation,proto3" json:"human_review_operation,omitempty"`
}
func (x *HumanReviewStatus) Reset() {
*x = HumanReviewStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HumanReviewStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HumanReviewStatus) ProtoMessage() {}
func (x *HumanReviewStatus) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HumanReviewStatus.ProtoReflect.Descriptor instead.
func (*HumanReviewStatus) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{1}
}
func (x *HumanReviewStatus) GetState() HumanReviewStatus_State {
if x != nil {
return x.State
}
return HumanReviewStatus_STATE_UNSPECIFIED
}
func (x *HumanReviewStatus) GetStateMessage() string {
if x != nil {
return x.StateMessage
}
return ""
}
func (x *HumanReviewStatus) GetHumanReviewOperation() string {
if x != nil {
return x.HumanReviewOperation
}
return ""
}
// Response message for the process document method.
type ProcessResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The document payload, will populate fields based on the processor's
// behavior.
Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
// The name of the operation triggered by the processed document. If the human
// review process is not triggered, this field will be empty. It has the same
// response type and metadata as the long running operation returned by
// ReviewDocument method.
//
// Deprecated: Do not use.
HumanReviewOperation string `protobuf:"bytes,2,opt,name=human_review_operation,json=humanReviewOperation,proto3" json:"human_review_operation,omitempty"`
// The status of human review on the processed document.
HumanReviewStatus *HumanReviewStatus `protobuf:"bytes,3,opt,name=human_review_status,json=humanReviewStatus,proto3" json:"human_review_status,omitempty"`
}
func (x *ProcessResponse) Reset() {
*x = ProcessResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProcessResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProcessResponse) ProtoMessage() {}
func (x *ProcessResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProcessResponse.ProtoReflect.Descriptor instead.
func (*ProcessResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{2}
}
func (x *ProcessResponse) GetDocument() *Document {
if x != nil {
return x.Document
}
return nil
}
// Deprecated: Do not use.
func (x *ProcessResponse) GetHumanReviewOperation() string {
if x != nil {
return x.HumanReviewOperation
}
return ""
}
func (x *ProcessResponse) GetHumanReviewStatus() *HumanReviewStatus {
if x != nil {
return x.HumanReviewStatus
}
return nil
}
// Request message for batch process document method.
type BatchProcessRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The processor resource name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The input config for each single document in the batch process.
//
// Deprecated: Do not use.
InputConfigs []*BatchProcessRequest_BatchInputConfig `protobuf:"bytes,2,rep,name=input_configs,json=inputConfigs,proto3" json:"input_configs,omitempty"`
// The overall output config for batch process.
//
// Deprecated: Do not use.
OutputConfig *BatchProcessRequest_BatchOutputConfig `protobuf:"bytes,3,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// The input documents for batch process.
InputDocuments *BatchDocumentsInputConfig `protobuf:"bytes,5,opt,name=input_documents,json=inputDocuments,proto3" json:"input_documents,omitempty"`
// The overall output config for batch process.
DocumentOutputConfig *DocumentOutputConfig `protobuf:"bytes,6,opt,name=document_output_config,json=documentOutputConfig,proto3" json:"document_output_config,omitempty"`
// Whether Human Review feature should be skipped for this request. Default to
// false.
SkipHumanReview bool `protobuf:"varint,4,opt,name=skip_human_review,json=skipHumanReview,proto3" json:"skip_human_review,omitempty"`
}
func (x *BatchProcessRequest) Reset() {
*x = BatchProcessRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchProcessRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchProcessRequest) ProtoMessage() {}
func (x *BatchProcessRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchProcessRequest.ProtoReflect.Descriptor instead.
func (*BatchProcessRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{3}
}
func (x *BatchProcessRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Deprecated: Do not use.
func (x *BatchProcessRequest) GetInputConfigs() []*BatchProcessRequest_BatchInputConfig {
if x != nil {
return x.InputConfigs
}
return nil
}
// Deprecated: Do not use.
func (x *BatchProcessRequest) GetOutputConfig() *BatchProcessRequest_BatchOutputConfig {
if x != nil {
return x.OutputConfig
}
return nil
}
func (x *BatchProcessRequest) GetInputDocuments() *BatchDocumentsInputConfig {
if x != nil {
return x.InputDocuments
}
return nil
}
func (x *BatchProcessRequest) GetDocumentOutputConfig() *DocumentOutputConfig {
if x != nil {
return x.DocumentOutputConfig
}
return nil
}
func (x *BatchProcessRequest) GetSkipHumanReview() bool {
if x != nil {
return x.SkipHumanReview
}
return false
}
// Response message for batch process document method.
type BatchProcessResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *BatchProcessResponse) Reset() {
*x = BatchProcessResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchProcessResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchProcessResponse) ProtoMessage() {}
func (x *BatchProcessResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchProcessResponse.ProtoReflect.Descriptor instead.
func (*BatchProcessResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{4}
}
// The long running operation metadata for batch process method.
type BatchProcessMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The state of the current batch processing.
State BatchProcessMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.documentai.v1beta3.BatchProcessMetadata_State" json:"state,omitempty"`
// A message providing more details about the current state of processing.
// For example, the error message if the operation is failed.
StateMessage string `protobuf:"bytes,2,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
// The creation time of the operation.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The last update time of the operation.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The list of response details of each document.
IndividualProcessStatuses []*BatchProcessMetadata_IndividualProcessStatus `protobuf:"bytes,5,rep,name=individual_process_statuses,json=individualProcessStatuses,proto3" json:"individual_process_statuses,omitempty"`
}
func (x *BatchProcessMetadata) Reset() {
*x = BatchProcessMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchProcessMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchProcessMetadata) ProtoMessage() {}
func (x *BatchProcessMetadata) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchProcessMetadata.ProtoReflect.Descriptor instead.
func (*BatchProcessMetadata) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{5}
}
func (x *BatchProcessMetadata) GetState() BatchProcessMetadata_State {
if x != nil {
return x.State
}
return BatchProcessMetadata_STATE_UNSPECIFIED
}
func (x *BatchProcessMetadata) GetStateMessage() string {
if x != nil {
return x.StateMessage
}
return ""
}
func (x *BatchProcessMetadata) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *BatchProcessMetadata) GetUpdateTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
func (x *BatchProcessMetadata) GetIndividualProcessStatuses() []*BatchProcessMetadata_IndividualProcessStatus {
if x != nil {
return x.IndividualProcessStatuses
}
return nil
}
// Request message for review document method.
type ReviewDocumentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The document payload.
//
// Types that are assignable to Source:
// *ReviewDocumentRequest_InlineDocument
Source isReviewDocumentRequest_Source `protobuf_oneof:"source"`
// Required. The resource name of the HumanReviewConfig that the document will be
// reviewed with.
HumanReviewConfig string `protobuf:"bytes,1,opt,name=human_review_config,json=humanReviewConfig,proto3" json:"human_review_config,omitempty"`
// The document that needs human review.
//
// Deprecated: Do not use.
Document *Document `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"`
}
func (x *ReviewDocumentRequest) Reset() {
*x = ReviewDocumentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReviewDocumentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReviewDocumentRequest) ProtoMessage() {}
func (x *ReviewDocumentRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReviewDocumentRequest.ProtoReflect.Descriptor instead.
func (*ReviewDocumentRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{6}
}
func (m *ReviewDocumentRequest) GetSource() isReviewDocumentRequest_Source {
if m != nil {
return m.Source
}
return nil
}
func (x *ReviewDocumentRequest) GetInlineDocument() *Document {
if x, ok := x.GetSource().(*ReviewDocumentRequest_InlineDocument); ok {
return x.InlineDocument
}
return nil
}
func (x *ReviewDocumentRequest) GetHumanReviewConfig() string {
if x != nil {
return x.HumanReviewConfig
}
return ""
}
// Deprecated: Do not use.
func (x *ReviewDocumentRequest) GetDocument() *Document {
if x != nil {
return x.Document
}
return nil
}
type isReviewDocumentRequest_Source interface {
isReviewDocumentRequest_Source()
}
type ReviewDocumentRequest_InlineDocument struct {
// An inline document proto.
InlineDocument *Document `protobuf:"bytes,4,opt,name=inline_document,json=inlineDocument,proto3,oneof"`
}
func (*ReviewDocumentRequest_InlineDocument) isReviewDocumentRequest_Source() {}
// Response message for review document method.
type ReviewDocumentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The Cloud Storage uri for the human reviewed document.
GcsDestination string `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3" json:"gcs_destination,omitempty"`
}
func (x *ReviewDocumentResponse) Reset() {
*x = ReviewDocumentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReviewDocumentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReviewDocumentResponse) ProtoMessage() {}
func (x *ReviewDocumentResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReviewDocumentResponse.ProtoReflect.Descriptor instead.
func (*ReviewDocumentResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{7}
}
func (x *ReviewDocumentResponse) GetGcsDestination() string {
if x != nil {
return x.GcsDestination
}
return ""
}
// The long running operation metadata for review document method.
type ReviewDocumentOperationMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Used only when Operation.done is false.
State ReviewDocumentOperationMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.documentai.v1beta3.ReviewDocumentOperationMetadata_State" json:"state,omitempty"`
// A message providing more details about the current state of processing.
// For example, the error message if the operation is failed.
StateMessage string `protobuf:"bytes,2,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
// The creation time of the operation.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The last update time of the operation.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The basic metadata of the long running operation.
CommonMetadata *CommonOperationMetadata `protobuf:"bytes,5,opt,name=common_metadata,json=commonMetadata,proto3" json:"common_metadata,omitempty"`
}
func (x *ReviewDocumentOperationMetadata) Reset() {
*x = ReviewDocumentOperationMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReviewDocumentOperationMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReviewDocumentOperationMetadata) ProtoMessage() {}
func (x *ReviewDocumentOperationMetadata) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReviewDocumentOperationMetadata.ProtoReflect.Descriptor instead.
func (*ReviewDocumentOperationMetadata) Descriptor() ([]byte, []int) {
return file_google_cloud_documentai_v1beta3_document_processor_service_proto_rawDescGZIP(), []int{8}
}
func (x *ReviewDocumentOperationMetadata) GetState() ReviewDocumentOperationMetadata_State {
if x != nil {
return x.State
}
return ReviewDocumentOperationMetadata_STATE_UNSPECIFIED
}
func (x *ReviewDocumentOperationMetadata) GetStateMessage() string {