com.google.cloud.documentai.v1beta3.BatchProcessRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-document-ai-v1beta3 Show documentation
Show all versions of proto-google-cloud-document-ai-v1beta3 Show documentation
PROTO library for proto-google-cloud-document-ai-v1beta3
/*
* Copyright 2020 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/documentai/v1beta3/document_processor_service.proto
package com.google.cloud.documentai.v1beta3;
/**
*
*
*
* Request message for batch process document method.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest}
*/
public final class BatchProcessRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessRequest)
BatchProcessRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use BatchProcessRequest.newBuilder() to construct.
private BatchProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BatchProcessRequest() {
name_ = "";
inputConfigs_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BatchProcessRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private BatchProcessRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18:
{
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
inputConfigs_ =
new java.util.ArrayList<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig>();
mutable_bitField0_ |= 0x00000001;
}
inputConfigs_.add(
input.readMessage(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
.parser(),
extensionRegistry));
break;
}
case 26:
{
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
subBuilder = null;
if (outputConfig_ != null) {
subBuilder = outputConfig_.toBuilder();
}
outputConfig_ =
input.readMessage(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outputConfig_);
outputConfig_ = subBuilder.buildPartial();
}
break;
}
case 32:
{
skipHumanReview_ = input.readBool();
break;
}
case 42:
{
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder subBuilder =
null;
if (inputDocuments_ != null) {
subBuilder = inputDocuments_.toBuilder();
}
inputDocuments_ =
input.readMessage(
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(inputDocuments_);
inputDocuments_ = subBuilder.buildPartial();
}
break;
}
case 50:
{
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.Builder subBuilder = null;
if (documentOutputConfig_ != null) {
subBuilder = documentOutputConfig_.toBuilder();
}
documentOutputConfig_ =
input.readMessage(
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(documentOutputConfig_);
documentOutputConfig_ = subBuilder.buildPartial();
}
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.class,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.Builder.class);
}
@java.lang.Deprecated
public interface BatchInputConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return The gcsSource.
*/
java.lang.String getGcsSource();
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return The bytes for gcsSource.
*/
com.google.protobuf.ByteString getGcsSourceBytes();
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return The mimeType.
*/
java.lang.String getMimeType();
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return The bytes for mimeType.
*/
com.google.protobuf.ByteString getMimeTypeBytes();
}
/**
*
*
*
* The message for input config in batch process.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig}
*/
@java.lang.Deprecated
public static final class BatchInputConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
BatchInputConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use BatchInputConfig.newBuilder() to construct.
private BatchInputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BatchInputConfig() {
gcsSource_ = "";
mimeType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BatchInputConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private BatchInputConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
gcsSource_ = s;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
mimeType_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.class,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
.class);
}
public static final int GCS_SOURCE_FIELD_NUMBER = 1;
private volatile java.lang.Object gcsSource_;
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return The gcsSource.
*/
@java.lang.Override
public java.lang.String getGcsSource() {
java.lang.Object ref = gcsSource_;
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();
gcsSource_ = s;
return s;
}
}
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return The bytes for gcsSource.
*/
@java.lang.Override
public com.google.protobuf.ByteString getGcsSourceBytes() {
java.lang.Object ref = gcsSource_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gcsSource_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MIME_TYPE_FIELD_NUMBER = 2;
private volatile java.lang.Object mimeType_;
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return The mimeType.
*/
@java.lang.Override
public java.lang.String getMimeType() {
java.lang.Object ref = mimeType_;
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();
mimeType_ = s;
return s;
}
}
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return The bytes for mimeType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMimeTypeBytes() {
java.lang.Object ref = mimeType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
mimeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsSource_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsSource_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsSource_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsSource_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)) {
return super.equals(obj);
}
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig other =
(com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig) obj;
if (!getGcsSource().equals(other.getGcsSource())) return false;
if (!getMimeType().equals(other.getMimeType())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getGcsSource().hashCode();
hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getMimeType().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The message for input config in batch process.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.class,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
.class);
}
// Construct using
// com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
gcsSource_ = "";
mimeType_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchInputConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
getDefaultInstanceForType() {
return com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig build() {
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
buildPartial() {
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig result =
new com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig(this);
result.gcsSource_ = gcsSource_;
result.mimeType_ = mimeType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig) {
return mergeFrom(
(com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig other) {
if (other
== com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
.getDefaultInstance()) return this;
if (!other.getGcsSource().isEmpty()) {
gcsSource_ = other.gcsSource_;
onChanged();
}
if (!other.getMimeType().isEmpty()) {
mimeType_ = other.mimeType_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig parsedMessage =
null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object gcsSource_ = "";
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return The gcsSource.
*/
public java.lang.String getGcsSource() {
java.lang.Object ref = gcsSource_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gcsSource_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return The bytes for gcsSource.
*/
public com.google.protobuf.ByteString getGcsSourceBytes() {
java.lang.Object ref = gcsSource_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gcsSource_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @param value The gcsSource to set.
* @return This builder for chaining.
*/
public Builder setGcsSource(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gcsSource_ = value;
onChanged();
return this;
}
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @return This builder for chaining.
*/
public Builder clearGcsSource() {
gcsSource_ = getDefaultInstance().getGcsSource();
onChanged();
return this;
}
/**
*
*
*
* The Cloud Storage location as the source of the document.
*
*
* string gcs_source = 1;
*
* @param value The bytes for gcsSource to set.
* @return This builder for chaining.
*/
public Builder setGcsSourceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gcsSource_ = value;
onChanged();
return this;
}
private java.lang.Object mimeType_ = "";
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return The mimeType.
*/
public java.lang.String getMimeType() {
java.lang.Object ref = mimeType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mimeType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return The bytes for mimeType.
*/
public com.google.protobuf.ByteString getMimeTypeBytes() {
java.lang.Object ref = mimeType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
mimeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @param value The mimeType to set.
* @return This builder for chaining.
*/
public Builder setMimeType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
mimeType_ = value;
onChanged();
return this;
}
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @return This builder for chaining.
*/
public Builder clearMimeType() {
mimeType_ = getDefaultInstance().getMimeType();
onChanged();
return this;
}
/**
*
*
*
* Mimetype of the input. If the input is a raw document, the supported
* mimetypes are application/pdf, image/tiff, and image/gif.
* If the input is a [Document] proto, the type should be application/json.
*
*
* string mime_type = 2;
*
* @param value The bytes for mimeType to set.
* @return This builder for chaining.
*/
public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
mimeType_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig)
private static final com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig();
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BatchInputConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BatchInputConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@java.lang.Deprecated
public interface BatchOutputConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return The gcsDestination.
*/
java.lang.String getGcsDestination();
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return The bytes for gcsDestination.
*/
com.google.protobuf.ByteString getGcsDestinationBytes();
}
/**
*
*
*
* The message for output config in batch process.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig}
*/
@java.lang.Deprecated
public static final class BatchOutputConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
BatchOutputConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use BatchOutputConfig.newBuilder() to construct.
private BatchOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BatchOutputConfig() {
gcsDestination_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BatchOutputConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private BatchOutputConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
gcsDestination_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.class,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
.class);
}
public static final int GCS_DESTINATION_FIELD_NUMBER = 1;
private volatile java.lang.Object gcsDestination_;
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return The gcsDestination.
*/
@java.lang.Override
public java.lang.String getGcsDestination() {
java.lang.Object ref = gcsDestination_;
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();
gcsDestination_ = s;
return s;
}
}
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return The bytes for gcsDestination.
*/
@java.lang.Override
public com.google.protobuf.ByteString getGcsDestinationBytes() {
java.lang.Object ref = gcsDestination_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gcsDestination_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsDestination_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsDestination_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsDestination_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsDestination_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)) {
return super.equals(obj);
}
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig other =
(com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig) obj;
if (!getGcsDestination().equals(other.getGcsDestination())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER;
hash = (53 * hash) + getGcsDestination().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The message for output config in batch process.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.class,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
.class);
}
// Construct using
// com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
gcsDestination_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_BatchOutputConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
getDefaultInstanceForType() {
return com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig build() {
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
buildPartial() {
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig result =
new com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig(this);
result.gcsDestination_ = gcsDestination_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig) {
return mergeFrom(
(com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig other) {
if (other
== com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
.getDefaultInstance()) return this;
if (!other.getGcsDestination().isEmpty()) {
gcsDestination_ = other.gcsDestination_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig parsedMessage =
null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object gcsDestination_ = "";
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return The gcsDestination.
*/
public java.lang.String getGcsDestination() {
java.lang.Object ref = gcsDestination_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gcsDestination_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return The bytes for gcsDestination.
*/
public com.google.protobuf.ByteString getGcsDestinationBytes() {
java.lang.Object ref = gcsDestination_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gcsDestination_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @param value The gcsDestination to set.
* @return This builder for chaining.
*/
public Builder setGcsDestination(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gcsDestination_ = value;
onChanged();
return this;
}
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @return This builder for chaining.
*/
public Builder clearGcsDestination() {
gcsDestination_ = getDefaultInstance().getGcsDestination();
onChanged();
return this;
}
/**
*
*
*
* The output Cloud Storage directory to put the processed documents.
*
*
* string gcs_destination = 1;
*
* @param value The bytes for gcsDestination to set.
* @return This builder for chaining.
*/
public Builder setGcsDestinationBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gcsDestination_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig)
private static final com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig();
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BatchOutputConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BatchOutputConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INPUT_CONFIGS_FIELD_NUMBER = 2;
private java.util.List
inputConfigs_;
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.List
getInputConfigsList() {
return inputConfigs_;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.List<
? extends
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
getInputConfigsOrBuilderList() {
return inputConfigs_;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public int getInputConfigsCount() {
return inputConfigs_.size();
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInputConfigs(
int index) {
return inputConfigs_.get(index);
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder
getInputConfigsOrBuilder(int index) {
return inputConfigs_.get(index);
}
public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3;
private com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig outputConfig_;
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
* @return Whether the outputConfig field is set.
*/
@java.lang.Override
@java.lang.Deprecated
public boolean hasOutputConfig() {
return outputConfig_ != null;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
* @return The outputConfig.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
getOutputConfig() {
return outputConfig_ == null
? com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
.getDefaultInstance()
: outputConfig_;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder
getOutputConfigOrBuilder() {
return getOutputConfig();
}
public static final int INPUT_DOCUMENTS_FIELD_NUMBER = 5;
private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig inputDocuments_;
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*
* @return Whether the inputDocuments field is set.
*/
@java.lang.Override
public boolean hasInputDocuments() {
return inputDocuments_ != null;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*
* @return The inputDocuments.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getInputDocuments() {
return inputDocuments_ == null
? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance()
: inputDocuments_;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder
getInputDocumentsOrBuilder() {
return getInputDocuments();
}
public static final int DOCUMENT_OUTPUT_CONFIG_FIELD_NUMBER = 6;
private com.google.cloud.documentai.v1beta3.DocumentOutputConfig documentOutputConfig_;
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
* @return Whether the documentOutputConfig field is set.
*/
@java.lang.Override
public boolean hasDocumentOutputConfig() {
return documentOutputConfig_ != null;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
* @return The documentOutputConfig.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.DocumentOutputConfig getDocumentOutputConfig() {
return documentOutputConfig_ == null
? com.google.cloud.documentai.v1beta3.DocumentOutputConfig.getDefaultInstance()
: documentOutputConfig_;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.DocumentOutputConfigOrBuilder
getDocumentOutputConfigOrBuilder() {
return getDocumentOutputConfig();
}
public static final int SKIP_HUMAN_REVIEW_FIELD_NUMBER = 4;
private boolean skipHumanReview_;
/**
*
*
*
* Whether Human Review feature should be skipped for this request. Default to
* false.
*
*
* bool skip_human_review = 4;
*
* @return The skipHumanReview.
*/
@java.lang.Override
public boolean getSkipHumanReview() {
return skipHumanReview_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < inputConfigs_.size(); i++) {
output.writeMessage(2, inputConfigs_.get(i));
}
if (outputConfig_ != null) {
output.writeMessage(3, getOutputConfig());
}
if (skipHumanReview_ != false) {
output.writeBool(4, skipHumanReview_);
}
if (inputDocuments_ != null) {
output.writeMessage(5, getInputDocuments());
}
if (documentOutputConfig_ != null) {
output.writeMessage(6, getDocumentOutputConfig());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
for (int i = 0; i < inputConfigs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputConfigs_.get(i));
}
if (outputConfig_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig());
}
if (skipHumanReview_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, skipHumanReview_);
}
if (inputDocuments_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInputDocuments());
}
if (documentOutputConfig_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDocumentOutputConfig());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.documentai.v1beta3.BatchProcessRequest)) {
return super.equals(obj);
}
com.google.cloud.documentai.v1beta3.BatchProcessRequest other =
(com.google.cloud.documentai.v1beta3.BatchProcessRequest) obj;
if (!getName().equals(other.getName())) return false;
if (!getInputConfigsList().equals(other.getInputConfigsList())) return false;
if (hasOutputConfig() != other.hasOutputConfig()) return false;
if (hasOutputConfig()) {
if (!getOutputConfig().equals(other.getOutputConfig())) return false;
}
if (hasInputDocuments() != other.hasInputDocuments()) return false;
if (hasInputDocuments()) {
if (!getInputDocuments().equals(other.getInputDocuments())) return false;
}
if (hasDocumentOutputConfig() != other.hasDocumentOutputConfig()) return false;
if (hasDocumentOutputConfig()) {
if (!getDocumentOutputConfig().equals(other.getDocumentOutputConfig())) return false;
}
if (getSkipHumanReview() != other.getSkipHumanReview()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getInputConfigsCount() > 0) {
hash = (37 * hash) + INPUT_CONFIGS_FIELD_NUMBER;
hash = (53 * hash) + getInputConfigsList().hashCode();
}
if (hasOutputConfig()) {
hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getOutputConfig().hashCode();
}
if (hasInputDocuments()) {
hash = (37 * hash) + INPUT_DOCUMENTS_FIELD_NUMBER;
hash = (53 * hash) + getInputDocuments().hashCode();
}
if (hasDocumentOutputConfig()) {
hash = (37 * hash) + DOCUMENT_OUTPUT_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getDocumentOutputConfig().hashCode();
}
hash = (37 * hash) + SKIP_HUMAN_REVIEW_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipHumanReview());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.documentai.v1beta3.BatchProcessRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Request message for batch process document method.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.BatchProcessRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.BatchProcessRequest)
com.google.cloud.documentai.v1beta3.BatchProcessRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.class,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.Builder.class);
}
// Construct using com.google.cloud.documentai.v1beta3.BatchProcessRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getInputConfigsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
if (inputConfigsBuilder_ == null) {
inputConfigs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
inputConfigsBuilder_.clear();
}
if (outputConfigBuilder_ == null) {
outputConfig_ = null;
} else {
outputConfig_ = null;
outputConfigBuilder_ = null;
}
if (inputDocumentsBuilder_ == null) {
inputDocuments_ = null;
} else {
inputDocuments_ = null;
inputDocumentsBuilder_ = null;
}
if (documentOutputConfigBuilder_ == null) {
documentOutputConfig_ = null;
} else {
documentOutputConfig_ = null;
documentOutputConfigBuilder_ = null;
}
skipHumanReview_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService
.internal_static_google_cloud_documentai_v1beta3_BatchProcessRequest_descriptor;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest getDefaultInstanceForType() {
return com.google.cloud.documentai.v1beta3.BatchProcessRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest build() {
com.google.cloud.documentai.v1beta3.BatchProcessRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest buildPartial() {
com.google.cloud.documentai.v1beta3.BatchProcessRequest result =
new com.google.cloud.documentai.v1beta3.BatchProcessRequest(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
if (inputConfigsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.inputConfigs_ = inputConfigs_;
} else {
result.inputConfigs_ = inputConfigsBuilder_.build();
}
if (outputConfigBuilder_ == null) {
result.outputConfig_ = outputConfig_;
} else {
result.outputConfig_ = outputConfigBuilder_.build();
}
if (inputDocumentsBuilder_ == null) {
result.inputDocuments_ = inputDocuments_;
} else {
result.inputDocuments_ = inputDocumentsBuilder_.build();
}
if (documentOutputConfigBuilder_ == null) {
result.documentOutputConfig_ = documentOutputConfig_;
} else {
result.documentOutputConfig_ = documentOutputConfigBuilder_.build();
}
result.skipHumanReview_ = skipHumanReview_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.documentai.v1beta3.BatchProcessRequest) {
return mergeFrom((com.google.cloud.documentai.v1beta3.BatchProcessRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.documentai.v1beta3.BatchProcessRequest other) {
if (other == com.google.cloud.documentai.v1beta3.BatchProcessRequest.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (inputConfigsBuilder_ == null) {
if (!other.inputConfigs_.isEmpty()) {
if (inputConfigs_.isEmpty()) {
inputConfigs_ = other.inputConfigs_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureInputConfigsIsMutable();
inputConfigs_.addAll(other.inputConfigs_);
}
onChanged();
}
} else {
if (!other.inputConfigs_.isEmpty()) {
if (inputConfigsBuilder_.isEmpty()) {
inputConfigsBuilder_.dispose();
inputConfigsBuilder_ = null;
inputConfigs_ = other.inputConfigs_;
bitField0_ = (bitField0_ & ~0x00000001);
inputConfigsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getInputConfigsFieldBuilder()
: null;
} else {
inputConfigsBuilder_.addAllMessages(other.inputConfigs_);
}
}
}
if (other.hasOutputConfig()) {
mergeOutputConfig(other.getOutputConfig());
}
if (other.hasInputDocuments()) {
mergeInputDocuments(other.getInputDocuments());
}
if (other.hasDocumentOutputConfig()) {
mergeDocumentOutputConfig(other.getDocumentOutputConfig());
}
if (other.getSkipHumanReview() != false) {
setSkipHumanReview(other.getSkipHumanReview());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.documentai.v1beta3.BatchProcessRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.documentai.v1beta3.BatchProcessRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* Required. The processor resource name.
*
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.util.List
inputConfigs_ = java.util.Collections.emptyList();
private void ensureInputConfigsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
inputConfigs_ =
new java.util.ArrayList<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig>(
inputConfigs_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
inputConfigsBuilder_;
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public java.util.List
getInputConfigsList() {
if (inputConfigsBuilder_ == null) {
return java.util.Collections.unmodifiableList(inputConfigs_);
} else {
return inputConfigsBuilder_.getMessageList();
}
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public int getInputConfigsCount() {
if (inputConfigsBuilder_ == null) {
return inputConfigs_.size();
} else {
return inputConfigsBuilder_.getCount();
}
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInputConfigs(
int index) {
if (inputConfigsBuilder_ == null) {
return inputConfigs_.get(index);
} else {
return inputConfigsBuilder_.getMessage(index);
}
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setInputConfigs(
int index, com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig value) {
if (inputConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputConfigsIsMutable();
inputConfigs_.set(index, value);
onChanged();
} else {
inputConfigsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setInputConfigs(
int index,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
builderForValue) {
if (inputConfigsBuilder_ == null) {
ensureInputConfigsIsMutable();
inputConfigs_.set(index, builderForValue.build());
onChanged();
} else {
inputConfigsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder addInputConfigs(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig value) {
if (inputConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputConfigsIsMutable();
inputConfigs_.add(value);
onChanged();
} else {
inputConfigsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder addInputConfigs(
int index, com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig value) {
if (inputConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputConfigsIsMutable();
inputConfigs_.add(index, value);
onChanged();
} else {
inputConfigsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder addInputConfigs(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
builderForValue) {
if (inputConfigsBuilder_ == null) {
ensureInputConfigsIsMutable();
inputConfigs_.add(builderForValue.build());
onChanged();
} else {
inputConfigsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder addInputConfigs(
int index,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
builderForValue) {
if (inputConfigsBuilder_ == null) {
ensureInputConfigsIsMutable();
inputConfigs_.add(index, builderForValue.build());
onChanged();
} else {
inputConfigsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder addAllInputConfigs(
java.lang.Iterable<
? extends com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig>
values) {
if (inputConfigsBuilder_ == null) {
ensureInputConfigsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_);
onChanged();
} else {
inputConfigsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder clearInputConfigs() {
if (inputConfigsBuilder_ == null) {
inputConfigs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
inputConfigsBuilder_.clear();
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder removeInputConfigs(int index) {
if (inputConfigsBuilder_ == null) {
ensureInputConfigsIsMutable();
inputConfigs_.remove(index);
onChanged();
} else {
inputConfigsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
getInputConfigsBuilder(int index) {
return getInputConfigsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder
getInputConfigsOrBuilder(int index) {
if (inputConfigsBuilder_ == null) {
return inputConfigs_.get(index);
} else {
return inputConfigsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public java.util.List<
? extends
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
getInputConfigsOrBuilderList() {
if (inputConfigsBuilder_ != null) {
return inputConfigsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(inputConfigs_);
}
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
addInputConfigsBuilder() {
return getInputConfigsFieldBuilder()
.addBuilder(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
.getDefaultInstance());
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder
addInputConfigsBuilder(int index) {
return getInputConfigsFieldBuilder()
.addBuilder(
index,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig
.getDefaultInstance());
}
/**
*
*
*
* The input config for each single document in the batch process.
*
*
*
* repeated .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig input_configs = 2 [deprecated = true];
*
*/
@java.lang.Deprecated
public java.util.List<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder>
getInputConfigsBuilderList() {
return getInputConfigsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>
getInputConfigsFieldBuilder() {
if (inputConfigsBuilder_ == null) {
inputConfigsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfigOrBuilder>(
inputConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
inputConfigs_ = null;
}
return inputConfigsBuilder_;
}
private com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig outputConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder>
outputConfigBuilder_;
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
* @return Whether the outputConfig field is set.
*/
@java.lang.Deprecated
public boolean hasOutputConfig() {
return outputConfigBuilder_ != null || outputConfig_ != null;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*
* @return The outputConfig.
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
getOutputConfig() {
if (outputConfigBuilder_ == null) {
return outputConfig_ == null
? com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
.getDefaultInstance()
: outputConfig_;
} else {
return outputConfigBuilder_.getMessage();
}
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setOutputConfig(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig value) {
if (outputConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outputConfig_ = value;
onChanged();
} else {
outputConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setOutputConfig(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
builderForValue) {
if (outputConfigBuilder_ == null) {
outputConfig_ = builderForValue.build();
onChanged();
} else {
outputConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder mergeOutputConfig(
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig value) {
if (outputConfigBuilder_ == null) {
if (outputConfig_ != null) {
outputConfig_ =
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.newBuilder(
outputConfig_)
.mergeFrom(value)
.buildPartial();
} else {
outputConfig_ = value;
}
onChanged();
} else {
outputConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder clearOutputConfig() {
if (outputConfigBuilder_ == null) {
outputConfig_ = null;
onChanged();
} else {
outputConfig_ = null;
outputConfigBuilder_ = null;
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder
getOutputConfigBuilder() {
onChanged();
return getOutputConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder
getOutputConfigOrBuilder() {
if (outputConfigBuilder_ != null) {
return outputConfigBuilder_.getMessageOrBuilder();
} else {
return outputConfig_ == null
? com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig
.getDefaultInstance()
: outputConfig_;
}
}
/**
*
*
*
* The overall output config for batch process.
*
*
*
* .google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig output_config = 3 [deprecated = true];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder>
getOutputConfigFieldBuilder() {
if (outputConfigBuilder_ == null) {
outputConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchOutputConfigOrBuilder>(
getOutputConfig(), getParentForChildren(), isClean());
outputConfig_ = null;
}
return outputConfigBuilder_;
}
private com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig inputDocuments_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig,
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>
inputDocumentsBuilder_;
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*
* @return Whether the inputDocuments field is set.
*/
public boolean hasInputDocuments() {
return inputDocumentsBuilder_ != null || inputDocuments_ != null;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*
* @return The inputDocuments.
*/
public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig getInputDocuments() {
if (inputDocumentsBuilder_ == null) {
return inputDocuments_ == null
? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance()
: inputDocuments_;
} else {
return inputDocumentsBuilder_.getMessage();
}
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
public Builder setInputDocuments(
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) {
if (inputDocumentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputDocuments_ = value;
onChanged();
} else {
inputDocumentsBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
public Builder setInputDocuments(
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder builderForValue) {
if (inputDocumentsBuilder_ == null) {
inputDocuments_ = builderForValue.build();
onChanged();
} else {
inputDocumentsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
public Builder mergeInputDocuments(
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig value) {
if (inputDocumentsBuilder_ == null) {
if (inputDocuments_ != null) {
inputDocuments_ =
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.newBuilder(
inputDocuments_)
.mergeFrom(value)
.buildPartial();
} else {
inputDocuments_ = value;
}
onChanged();
} else {
inputDocumentsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
public Builder clearInputDocuments() {
if (inputDocumentsBuilder_ == null) {
inputDocuments_ = null;
onChanged();
} else {
inputDocuments_ = null;
inputDocumentsBuilder_ = null;
}
return this;
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder
getInputDocumentsBuilder() {
onChanged();
return getInputDocumentsFieldBuilder().getBuilder();
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
public com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder
getInputDocumentsOrBuilder() {
if (inputDocumentsBuilder_ != null) {
return inputDocumentsBuilder_.getMessageOrBuilder();
} else {
return inputDocuments_ == null
? com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.getDefaultInstance()
: inputDocuments_;
}
}
/**
*
*
*
* The input documents for batch process.
*
*
* .google.cloud.documentai.v1beta3.BatchDocumentsInputConfig input_documents = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig,
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>
getInputDocumentsFieldBuilder() {
if (inputDocumentsBuilder_ == null) {
inputDocumentsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig,
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.Builder,
com.google.cloud.documentai.v1beta3.BatchDocumentsInputConfigOrBuilder>(
getInputDocuments(), getParentForChildren(), isClean());
inputDocuments_ = null;
}
return inputDocumentsBuilder_;
}
private com.google.cloud.documentai.v1beta3.DocumentOutputConfig documentOutputConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.DocumentOutputConfig,
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.Builder,
com.google.cloud.documentai.v1beta3.DocumentOutputConfigOrBuilder>
documentOutputConfigBuilder_;
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*
* @return Whether the documentOutputConfig field is set.
*/
public boolean hasDocumentOutputConfig() {
return documentOutputConfigBuilder_ != null || documentOutputConfig_ != null;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*
* @return The documentOutputConfig.
*/
public com.google.cloud.documentai.v1beta3.DocumentOutputConfig getDocumentOutputConfig() {
if (documentOutputConfigBuilder_ == null) {
return documentOutputConfig_ == null
? com.google.cloud.documentai.v1beta3.DocumentOutputConfig.getDefaultInstance()
: documentOutputConfig_;
} else {
return documentOutputConfigBuilder_.getMessage();
}
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
public Builder setDocumentOutputConfig(
com.google.cloud.documentai.v1beta3.DocumentOutputConfig value) {
if (documentOutputConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
documentOutputConfig_ = value;
onChanged();
} else {
documentOutputConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
public Builder setDocumentOutputConfig(
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.Builder builderForValue) {
if (documentOutputConfigBuilder_ == null) {
documentOutputConfig_ = builderForValue.build();
onChanged();
} else {
documentOutputConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
public Builder mergeDocumentOutputConfig(
com.google.cloud.documentai.v1beta3.DocumentOutputConfig value) {
if (documentOutputConfigBuilder_ == null) {
if (documentOutputConfig_ != null) {
documentOutputConfig_ =
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.newBuilder(
documentOutputConfig_)
.mergeFrom(value)
.buildPartial();
} else {
documentOutputConfig_ = value;
}
onChanged();
} else {
documentOutputConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
public Builder clearDocumentOutputConfig() {
if (documentOutputConfigBuilder_ == null) {
documentOutputConfig_ = null;
onChanged();
} else {
documentOutputConfig_ = null;
documentOutputConfigBuilder_ = null;
}
return this;
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
public com.google.cloud.documentai.v1beta3.DocumentOutputConfig.Builder
getDocumentOutputConfigBuilder() {
onChanged();
return getDocumentOutputConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
public com.google.cloud.documentai.v1beta3.DocumentOutputConfigOrBuilder
getDocumentOutputConfigOrBuilder() {
if (documentOutputConfigBuilder_ != null) {
return documentOutputConfigBuilder_.getMessageOrBuilder();
} else {
return documentOutputConfig_ == null
? com.google.cloud.documentai.v1beta3.DocumentOutputConfig.getDefaultInstance()
: documentOutputConfig_;
}
}
/**
*
*
*
* The overall output config for batch process.
*
*
* .google.cloud.documentai.v1beta3.DocumentOutputConfig document_output_config = 6;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.DocumentOutputConfig,
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.Builder,
com.google.cloud.documentai.v1beta3.DocumentOutputConfigOrBuilder>
getDocumentOutputConfigFieldBuilder() {
if (documentOutputConfigBuilder_ == null) {
documentOutputConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.DocumentOutputConfig,
com.google.cloud.documentai.v1beta3.DocumentOutputConfig.Builder,
com.google.cloud.documentai.v1beta3.DocumentOutputConfigOrBuilder>(
getDocumentOutputConfig(), getParentForChildren(), isClean());
documentOutputConfig_ = null;
}
return documentOutputConfigBuilder_;
}
private boolean skipHumanReview_;
/**
*
*
*
* Whether Human Review feature should be skipped for this request. Default to
* false.
*
*
* bool skip_human_review = 4;
*
* @return The skipHumanReview.
*/
@java.lang.Override
public boolean getSkipHumanReview() {
return skipHumanReview_;
}
/**
*
*
*
* Whether Human Review feature should be skipped for this request. Default to
* false.
*
*
* bool skip_human_review = 4;
*
* @param value The skipHumanReview to set.
* @return This builder for chaining.
*/
public Builder setSkipHumanReview(boolean value) {
skipHumanReview_ = value;
onChanged();
return this;
}
/**
*
*
*
* Whether Human Review feature should be skipped for this request. Default to
* false.
*
*
* bool skip_human_review = 4;
*
* @return This builder for chaining.
*/
public Builder clearSkipHumanReview() {
skipHumanReview_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.BatchProcessRequest)
}
// @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.BatchProcessRequest)
private static final com.google.cloud.documentai.v1beta3.BatchProcessRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.BatchProcessRequest();
}
public static com.google.cloud.documentai.v1beta3.BatchProcessRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BatchProcessRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BatchProcessRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.BatchProcessRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy