From 388a704282d7854b38143b2692b90893da040fb8 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Tue, 8 Feb 2022 23:27:08 +0000
Subject: [PATCH] feat: add question_id field in
ReviewDocumentOperationMetadata (#742)
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 426180523
Source-Link: https://github.com/googleapis/googleapis/commit/38a8eb97e2b3d0f0cceefc8190c12bdcefff7214
Source-Link: https://github.com/googleapis/googleapis-gen/commit/9a1a88b211e2e94bc8e35855378e0523cb8a6683
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWExYTg4YjIxMWUyZTk0YmM4ZTM1ODU1Mzc4ZTA1MjNjYjhhNjY4MyJ9
---
.../v1beta3/DocumentAiProcessorService.java | 140 +++++++-------
.../ReviewDocumentOperationMetadata.java | 179 ++++++++++++++++++
...iewDocumentOperationMetadataOrBuilder.java | 25 +++
.../v1beta3/document_processor_service.proto | 3 +
4 files changed, 277 insertions(+), 70 deletions(-)
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java
index 601340aa..6833459e 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java
@@ -245,7 +245,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "a3.ReviewDocumentRequest.Priority\"#\n\010Pri"
+ "ority\022\013\n\007DEFAULT\020\000\022\n\n\006URGENT\020\001B\010\n\006source"
+ "\"1\n\026ReviewDocumentResponse\022\027\n\017gcs_destin"
- + "ation\030\001 \001(\t\"\253\003\n\037ReviewDocumentOperationM"
+ + "ation\030\001 \001(\t\"\300\003\n\037ReviewDocumentOperationM"
+ "etadata\022U\n\005state\030\001 \001(\0162F.google.cloud.do"
+ "cumentai.v1beta3.ReviewDocumentOperation"
+ "Metadata.State\022\025\n\rstate_message\030\002 \001(\t\022/\n"
@@ -253,76 +253,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "estamp\022/\n\013update_time\030\004 \001(\0132\032.google.pro"
+ "tobuf.Timestamp\022Q\n\017common_metadata\030\005 \001(\013"
+ "28.google.cloud.documentai.v1beta3.Commo"
- + "nOperationMetadata\"e\n\005State\022\025\n\021STATE_UNS"
- + "PECIFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCELLING\020\002\022"
- + "\r\n\tSUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\r\n\tCANCELLED\020"
- + "\0052\207\021\n\030DocumentProcessorService\022\303\001\n\017Proce"
- + "ssDocument\022/.google.cloud.documentai.v1b"
- + "eta3.ProcessRequest\0320.google.cloud.docum"
- + "entai.v1beta3.ProcessResponse\"M\202\323\344\223\002@\";/"
- + "v1beta3/{name=projects/*/locations/*/pro"
- + "cessors/*}:process:\001*\332A\004name\022\360\001\n\025BatchPr"
- + "ocessDocuments\0224.google.cloud.documentai"
- + ".v1beta3.BatchProcessRequest\032\035.google.lo"
- + "ngrunning.Operation\"\201\001\202\323\344\223\002E\"@/v1beta3/{"
- + "name=projects/*/locations/*/processors/*"
- + "}:batchProcess:\001*\332A\004name\312A,\n\024BatchProces"
- + "sResponse\022\024BatchProcessMetadata\022\337\001\n\023Fetc"
- + "hProcessorTypes\022;.google.cloud.documenta"
- + "i.v1beta3.FetchProcessorTypesRequest\032<.g"
+ + "nOperationMetadata\022\023\n\013question_id\030\006 \001(\t\""
+ + "e\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNI"
+ + "NG\020\001\022\016\n\nCANCELLING\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006F"
+ + "AILED\020\004\022\r\n\tCANCELLED\020\0052\207\021\n\030DocumentProce"
+ + "ssorService\022\303\001\n\017ProcessDocument\022/.google"
+ + ".cloud.documentai.v1beta3.ProcessRequest"
+ + "\0320.google.cloud.documentai.v1beta3.Proce"
+ + "ssResponse\"M\202\323\344\223\002@\";/v1beta3/{name=proje"
+ + "cts/*/locations/*/processors/*}:process:"
+ + "\001*\332A\004name\022\360\001\n\025BatchProcessDocuments\0224.go"
+ + "ogle.cloud.documentai.v1beta3.BatchProce"
+ + "ssRequest\032\035.google.longrunning.Operation"
+ + "\"\201\001\202\323\344\223\002E\"@/v1beta3/{name=projects/*/loc"
+ + "ations/*/processors/*}:batchProcess:\001*\332A"
+ + "\004name\312A,\n\024BatchProcessResponse\022\024BatchPro"
+ + "cessMetadata\022\337\001\n\023FetchProcessorTypes\022;.g"
+ "oogle.cloud.documentai.v1beta3.FetchProc"
- + "essorTypesResponse\"M\202\323\344\223\002>\022\022
+ * The question ID.
+ *
+ *
+ * string question_id = 6;
+ *
+ * @return The questionId.
+ */
+ @java.lang.Override
+ public java.lang.String getQuestionId() {
+ java.lang.Object ref = questionId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ questionId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @return The bytes for questionId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getQuestionIdBytes() {
+ java.lang.Object ref = questionId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ questionId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -654,6 +711,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (commonMetadata_ != null) {
output.writeMessage(5, getCommonMetadata());
}
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(questionId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, questionId_);
+ }
unknownFields.writeTo(output);
}
@@ -681,6 +741,9 @@ public int getSerializedSize() {
if (commonMetadata_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCommonMetadata());
}
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(questionId_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, questionId_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -711,6 +774,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasCommonMetadata()) {
if (!getCommonMetadata().equals(other.getCommonMetadata())) return false;
}
+ if (!getQuestionId().equals(other.getQuestionId())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -738,6 +802,8 @@ public int hashCode() {
hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getCommonMetadata().hashCode();
}
+ hash = (37 * hash) + QUESTION_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getQuestionId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -908,6 +974,8 @@ public Builder clear() {
commonMetadata_ = null;
commonMetadataBuilder_ = null;
}
+ questionId_ = "";
+
return this;
}
@@ -954,6 +1022,7 @@ public com.google.cloud.documentai.v1beta3.ReviewDocumentOperationMetadata build
} else {
result.commonMetadata_ = commonMetadataBuilder_.build();
}
+ result.questionId_ = questionId_;
onBuilt();
return result;
}
@@ -1023,6 +1092,10 @@ public Builder mergeFrom(
if (other.hasCommonMetadata()) {
mergeCommonMetadata(other.getCommonMetadata());
}
+ if (!other.getQuestionId().isEmpty()) {
+ questionId_ = other.questionId_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1821,6 +1894,112 @@ public Builder clearCommonMetadata() {
return commonMetadataBuilder_;
}
+ private java.lang.Object questionId_ = "";
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @return The questionId.
+ */
+ public java.lang.String getQuestionId() {
+ java.lang.Object ref = questionId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ questionId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @return The bytes for questionId.
+ */
+ public com.google.protobuf.ByteString getQuestionIdBytes() {
+ java.lang.Object ref = questionId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ questionId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @param value The questionId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuestionId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ questionId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearQuestionId() {
+
+ questionId_ = getDefaultInstance().getQuestionId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @param value The bytes for questionId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuestionIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ questionId_ = value;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadataOrBuilder.java b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadataOrBuilder.java
index 40b4989c..4e1a2478 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadataOrBuilder.java
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentOperationMetadataOrBuilder.java
@@ -179,4 +179,29 @@ public interface ReviewDocumentOperationMetadataOrBuilder
* .google.cloud.documentai.v1beta3.CommonOperationMetadata common_metadata = 5;
*/
com.google.cloud.documentai.v1beta3.CommonOperationMetadataOrBuilder getCommonMetadataOrBuilder();
+
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @return The questionId.
+ */
+ java.lang.String getQuestionId();
+ /**
+ *
+ *
+ * + * The question ID. + *+ * + *
string question_id = 6;
+ *
+ * @return The bytes for questionId.
+ */
+ com.google.protobuf.ByteString getQuestionIdBytes();
}
diff --git a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto
index e76a0316..ae589642 100644
--- a/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto
+++ b/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto
@@ -569,4 +569,7 @@ message ReviewDocumentOperationMetadata {
// The basic metadata of the long running operation.
CommonOperationMetadata common_metadata = 5;
+
+ // The question ID.
+ string question_id = 6;
}