com.google.cloud.documentai.v1beta3.ProcessorVersion 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 2024 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/processor.proto
// Protobuf Java Version: 3.25.2
package com.google.cloud.documentai.v1beta3;
/**
*
*
*
* A processor version is an implementation of a processor. Each processor
* can have multiple versions, pretrained by Google internally or uptrained
* by the customer. A processor can only have one default version at a time.
* Its document-processing behavior is defined by that version.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.ProcessorVersion}
*/
public final class ProcessorVersion extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ProcessorVersion)
ProcessorVersionOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProcessorVersion.newBuilder() to construct.
private ProcessorVersion(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProcessorVersion() {
name_ = "";
displayName_ = "";
state_ = 0;
kmsKeyName_ = "";
kmsKeyVersionName_ = "";
modelType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ProcessorVersion();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.ProcessorVersion.class,
com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder.class);
}
/**
*
*
*
* The possible states of the processor version.
*
*
* Protobuf enum {@code google.cloud.documentai.v1beta3.ProcessorVersion.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The processor version is in an unspecified state.
*
*
* STATE_UNSPECIFIED = 0;
*/
STATE_UNSPECIFIED(0),
/**
*
*
*
* The processor version is deployed and can be used for processing.
*
*
* DEPLOYED = 1;
*/
DEPLOYED(1),
/**
*
*
*
* The processor version is being deployed.
*
*
* DEPLOYING = 2;
*/
DEPLOYING(2),
/**
*
*
*
* The processor version is not deployed and cannot be used for processing.
*
*
* UNDEPLOYED = 3;
*/
UNDEPLOYED(3),
/**
*
*
*
* The processor version is being undeployed.
*
*
* UNDEPLOYING = 4;
*/
UNDEPLOYING(4),
/**
*
*
*
* The processor version is being created.
*
*
* CREATING = 5;
*/
CREATING(5),
/**
*
*
*
* The processor version is being deleted.
*
*
* DELETING = 6;
*/
DELETING(6),
/**
*
*
*
* The processor version failed and is in an indeterminate state.
*
*
* FAILED = 7;
*/
FAILED(7),
/**
*
*
*
* The processor version is being imported.
*
*
* IMPORTING = 8;
*/
IMPORTING(8),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The processor version is in an unspecified state.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The processor version is deployed and can be used for processing.
*
*
* DEPLOYED = 1;
*/
public static final int DEPLOYED_VALUE = 1;
/**
*
*
*
* The processor version is being deployed.
*
*
* DEPLOYING = 2;
*/
public static final int DEPLOYING_VALUE = 2;
/**
*
*
*
* The processor version is not deployed and cannot be used for processing.
*
*
* UNDEPLOYED = 3;
*/
public static final int UNDEPLOYED_VALUE = 3;
/**
*
*
*
* The processor version is being undeployed.
*
*
* UNDEPLOYING = 4;
*/
public static final int UNDEPLOYING_VALUE = 4;
/**
*
*
*
* The processor version is being created.
*
*
* CREATING = 5;
*/
public static final int CREATING_VALUE = 5;
/**
*
*
*
* The processor version is being deleted.
*
*
* DELETING = 6;
*/
public static final int DELETING_VALUE = 6;
/**
*
*
*
* The processor version failed and is in an indeterminate state.
*
*
* FAILED = 7;
*/
public static final int FAILED_VALUE = 7;
/**
*
*
*
* The processor version is being imported.
*
*
* IMPORTING = 8;
*/
public static final int IMPORTING_VALUE = 8;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return DEPLOYED;
case 2:
return DEPLOYING;
case 3:
return UNDEPLOYED;
case 4:
return UNDEPLOYING;
case 5:
return CREATING;
case 6:
return DELETING;
case 7:
return FAILED;
case 8:
return IMPORTING;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public State findValueByNumber(int number) {
return State.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.ProcessorVersion.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final State[] VALUES = values();
public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta3.ProcessorVersion.State)
}
/**
*
*
*
* The possible model types of the processor version.
*
*
* Protobuf enum {@code google.cloud.documentai.v1beta3.ProcessorVersion.ModelType}
*/
public enum ModelType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The processor version has unspecified model type.
*
*
* MODEL_TYPE_UNSPECIFIED = 0;
*/
MODEL_TYPE_UNSPECIFIED(0),
/**
*
*
*
* The processor version has generative model type.
*
*
* MODEL_TYPE_GENERATIVE = 1;
*/
MODEL_TYPE_GENERATIVE(1),
/**
*
*
*
* The processor version has custom model type.
*
*
* MODEL_TYPE_CUSTOM = 2;
*/
MODEL_TYPE_CUSTOM(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The processor version has unspecified model type.
*
*
* MODEL_TYPE_UNSPECIFIED = 0;
*/
public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The processor version has generative model type.
*
*
* MODEL_TYPE_GENERATIVE = 1;
*/
public static final int MODEL_TYPE_GENERATIVE_VALUE = 1;
/**
*
*
*
* The processor version has custom model type.
*
*
* MODEL_TYPE_CUSTOM = 2;
*/
public static final int MODEL_TYPE_CUSTOM_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ModelType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ModelType forNumber(int value) {
switch (value) {
case 0:
return MODEL_TYPE_UNSPECIFIED;
case 1:
return MODEL_TYPE_GENERATIVE;
case 2:
return MODEL_TYPE_CUSTOM;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ModelType findValueByNumber(int number) {
return ModelType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.ProcessorVersion.getDescriptor()
.getEnumTypes()
.get(1);
}
private static final ModelType[] VALUES = values();
public static ModelType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ModelType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.documentai.v1beta3.ProcessorVersion.ModelType)
}
public interface DeprecationInfoOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*
* @return Whether the deprecationTime field is set.
*/
boolean hasDeprecationTime();
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*
* @return The deprecationTime.
*/
com.google.protobuf.Timestamp getDeprecationTime();
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
com.google.protobuf.TimestampOrBuilder getDeprecationTimeOrBuilder();
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return The replacementProcessorVersion.
*/
java.lang.String getReplacementProcessorVersion();
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return The bytes for replacementProcessorVersion.
*/
com.google.protobuf.ByteString getReplacementProcessorVersionBytes();
}
/**
*
*
*
* Information about the upcoming deprecation of this processor version.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo}
*/
public static final class DeprecationInfo extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo)
DeprecationInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use DeprecationInfo.newBuilder() to construct.
private DeprecationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DeprecationInfo() {
replacementProcessorVersion_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new DeprecationInfo();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_DeprecationInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_DeprecationInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.class,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder.class);
}
private int bitField0_;
public static final int DEPRECATION_TIME_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp deprecationTime_;
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*
* @return Whether the deprecationTime field is set.
*/
@java.lang.Override
public boolean hasDeprecationTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*
* @return The deprecationTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getDeprecationTime() {
return deprecationTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deprecationTime_;
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDeprecationTimeOrBuilder() {
return deprecationTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deprecationTime_;
}
public static final int REPLACEMENT_PROCESSOR_VERSION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object replacementProcessorVersion_ = "";
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return The replacementProcessorVersion.
*/
@java.lang.Override
public java.lang.String getReplacementProcessorVersion() {
java.lang.Object ref = replacementProcessorVersion_;
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();
replacementProcessorVersion_ = s;
return s;
}
}
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return The bytes for replacementProcessorVersion.
*/
@java.lang.Override
public com.google.protobuf.ByteString getReplacementProcessorVersionBytes() {
java.lang.Object ref = replacementProcessorVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
replacementProcessorVersion_ = 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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getDeprecationTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementProcessorVersion_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, replacementProcessorVersion_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeprecationTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementProcessorVersion_)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(
2, replacementProcessorVersion_);
}
size += getUnknownFields().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.ProcessorVersion.DeprecationInfo)) {
return super.equals(obj);
}
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo other =
(com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo) obj;
if (hasDeprecationTime() != other.hasDeprecationTime()) return false;
if (hasDeprecationTime()) {
if (!getDeprecationTime().equals(other.getDeprecationTime())) return false;
}
if (!getReplacementProcessorVersion().equals(other.getReplacementProcessorVersion()))
return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDeprecationTime()) {
hash = (37 * hash) + DEPRECATION_TIME_FIELD_NUMBER;
hash = (53 * hash) + getDeprecationTime().hashCode();
}
hash = (37 * hash) + REPLACEMENT_PROCESSOR_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getReplacementProcessorVersion().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo 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.ProcessorVersion.DeprecationInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo 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.ProcessorVersion.DeprecationInfo parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo 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.ProcessorVersion.DeprecationInfo parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo 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.ProcessorVersion.DeprecationInfo
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
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.ProcessorVersion.DeprecationInfo 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.ProcessorVersion.DeprecationInfo 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.ProcessorVersion.DeprecationInfo 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;
}
/**
*
*
*
* Information about the upcoming deprecation of this processor version.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo)
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_DeprecationInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_DeprecationInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.class,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder.class);
}
// Construct using
// com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getDeprecationTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
deprecationTime_ = null;
if (deprecationTimeBuilder_ != null) {
deprecationTimeBuilder_.dispose();
deprecationTimeBuilder_ = null;
}
replacementProcessorVersion_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_DeprecationInfo_descriptor;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
getDefaultInstanceForType() {
return com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo build() {
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo buildPartial() {
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo result =
new com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.deprecationTime_ =
deprecationTimeBuilder_ == null ? deprecationTime_ : deprecationTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.replacementProcessorVersion_ = replacementProcessorVersion_;
}
result.bitField0_ |= to_bitField0_;
}
@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.ProcessorVersion.DeprecationInfo) {
return mergeFrom(
(com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo other) {
if (other
== com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
.getDefaultInstance()) return this;
if (other.hasDeprecationTime()) {
mergeDeprecationTime(other.getDeprecationTime());
}
if (!other.getReplacementProcessorVersion().isEmpty()) {
replacementProcessorVersion_ = other.replacementProcessorVersion_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(
getDeprecationTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
replacementProcessorVersion_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.Timestamp deprecationTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
deprecationTimeBuilder_;
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*
* @return Whether the deprecationTime field is set.
*/
public boolean hasDeprecationTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*
* @return The deprecationTime.
*/
public com.google.protobuf.Timestamp getDeprecationTime() {
if (deprecationTimeBuilder_ == null) {
return deprecationTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deprecationTime_;
} else {
return deprecationTimeBuilder_.getMessage();
}
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
public Builder setDeprecationTime(com.google.protobuf.Timestamp value) {
if (deprecationTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
deprecationTime_ = value;
} else {
deprecationTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
public Builder setDeprecationTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (deprecationTimeBuilder_ == null) {
deprecationTime_ = builderForValue.build();
} else {
deprecationTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
public Builder mergeDeprecationTime(com.google.protobuf.Timestamp value) {
if (deprecationTimeBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& deprecationTime_ != null
&& deprecationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getDeprecationTimeBuilder().mergeFrom(value);
} else {
deprecationTime_ = value;
}
} else {
deprecationTimeBuilder_.mergeFrom(value);
}
if (deprecationTime_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
public Builder clearDeprecationTime() {
bitField0_ = (bitField0_ & ~0x00000001);
deprecationTime_ = null;
if (deprecationTimeBuilder_ != null) {
deprecationTimeBuilder_.dispose();
deprecationTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
public com.google.protobuf.Timestamp.Builder getDeprecationTimeBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getDeprecationTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
public com.google.protobuf.TimestampOrBuilder getDeprecationTimeOrBuilder() {
if (deprecationTimeBuilder_ != null) {
return deprecationTimeBuilder_.getMessageOrBuilder();
} else {
return deprecationTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deprecationTime_;
}
}
/**
*
*
*
* The time at which this processor version will be deprecated.
*
*
* .google.protobuf.Timestamp deprecation_time = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getDeprecationTimeFieldBuilder() {
if (deprecationTimeBuilder_ == null) {
deprecationTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getDeprecationTime(), getParentForChildren(), isClean());
deprecationTime_ = null;
}
return deprecationTimeBuilder_;
}
private java.lang.Object replacementProcessorVersion_ = "";
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return The replacementProcessorVersion.
*/
public java.lang.String getReplacementProcessorVersion() {
java.lang.Object ref = replacementProcessorVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
replacementProcessorVersion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return The bytes for replacementProcessorVersion.
*/
public com.google.protobuf.ByteString getReplacementProcessorVersionBytes() {
java.lang.Object ref = replacementProcessorVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
replacementProcessorVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @param value The replacementProcessorVersion to set.
* @return This builder for chaining.
*/
public Builder setReplacementProcessorVersion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
replacementProcessorVersion_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearReplacementProcessorVersion() {
replacementProcessorVersion_ = getDefaultInstance().getReplacementProcessorVersion();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* If set, the processor version that will be used as a replacement.
*
*
* string replacement_processor_version = 2 [(.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for replacementProcessorVersion to set.
* @return This builder for chaining.
*/
public Builder setReplacementProcessorVersionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
replacementProcessorVersion_ = value;
bitField0_ |= 0x00000002;
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.ProcessorVersion.DeprecationInfo)
}
// @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo)
private static final com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo();
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DeprecationInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.ProcessorVersion.DeprecationInfo
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @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;
}
}
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @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 DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DOCUMENT_SCHEMA_FIELD_NUMBER = 12;
private com.google.cloud.documentai.v1beta3.DocumentSchema documentSchema_;
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*
* @return Whether the documentSchema field is set.
*/
@java.lang.Override
public boolean hasDocumentSchema() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*
* @return The documentSchema.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema() {
return documentSchema_ == null
? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance()
: documentSchema_;
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder getDocumentSchemaOrBuilder() {
return documentSchema_ == null
? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance()
: documentSchema_;
}
public static final int STATE_FIELD_NUMBER = 6;
private int state_ = 0;
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.State getState() {
com.google.cloud.documentai.v1beta3.ProcessorVersion.State result =
com.google.cloud.documentai.v1beta3.ProcessorVersion.State.forNumber(state_);
return result == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.State.UNRECOGNIZED
: result;
}
public static final int CREATE_TIME_FIELD_NUMBER = 7;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*
* @return The createTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreateTime() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
public static final int LATEST_EVALUATION_FIELD_NUMBER = 8;
private com.google.cloud.documentai.v1beta3.EvaluationReference latestEvaluation_;
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*
* @return Whether the latestEvaluation field is set.
*/
@java.lang.Override
public boolean hasLatestEvaluation() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*
* @return The latestEvaluation.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.EvaluationReference getLatestEvaluation() {
return latestEvaluation_ == null
? com.google.cloud.documentai.v1beta3.EvaluationReference.getDefaultInstance()
: latestEvaluation_;
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.EvaluationReferenceOrBuilder
getLatestEvaluationOrBuilder() {
return latestEvaluation_ == null
? com.google.cloud.documentai.v1beta3.EvaluationReference.getDefaultInstance()
: latestEvaluation_;
}
public static final int KMS_KEY_NAME_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private volatile java.lang.Object kmsKeyName_ = "";
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @return The kmsKeyName.
*/
@java.lang.Override
public java.lang.String getKmsKeyName() {
java.lang.Object ref = kmsKeyName_;
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();
kmsKeyName_ = s;
return s;
}
}
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @return The bytes for kmsKeyName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKmsKeyNameBytes() {
java.lang.Object ref = kmsKeyName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKeyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KMS_KEY_VERSION_NAME_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private volatile java.lang.Object kmsKeyVersionName_ = "";
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @return The kmsKeyVersionName.
*/
@java.lang.Override
public java.lang.String getKmsKeyVersionName() {
java.lang.Object ref = kmsKeyVersionName_;
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();
kmsKeyVersionName_ = s;
return s;
}
}
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @return The bytes for kmsKeyVersionName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKmsKeyVersionNameBytes() {
java.lang.Object ref = kmsKeyVersionName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKeyVersionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GOOGLE_MANAGED_FIELD_NUMBER = 11;
private boolean googleManaged_ = false;
/**
*
*
*
* Output only. Denotes that this `ProcessorVersion` is managed by Google.
*
*
* bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The googleManaged.
*/
@java.lang.Override
public boolean getGoogleManaged() {
return googleManaged_;
}
public static final int DEPRECATION_INFO_FIELD_NUMBER = 13;
private com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecationInfo_;
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*
* @return Whether the deprecationInfo field is set.
*/
@java.lang.Override
public boolean hasDeprecationInfo() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*
* @return The deprecationInfo.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo getDeprecationInfo() {
return deprecationInfo_ == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.getDefaultInstance()
: deprecationInfo_;
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfoOrBuilder
getDeprecationInfoOrBuilder() {
return deprecationInfo_ == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.getDefaultInstance()
: deprecationInfo_;
}
public static final int MODEL_TYPE_FIELD_NUMBER = 15;
private int modelType_ = 0;
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for modelType.
*/
@java.lang.Override
public int getModelTypeValue() {
return modelType_;
}
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The modelType.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType getModelType() {
com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType result =
com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType.forNumber(modelType_);
return result == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType.UNRECOGNIZED
: result;
}
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_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (state_
!= com.google.cloud.documentai.v1beta3.ProcessorVersion.State.STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(6, state_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getCreateTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(8, getLatestEvaluation());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, kmsKeyName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyVersionName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, kmsKeyVersionName_);
}
if (googleManaged_ != false) {
output.writeBool(11, googleManaged_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(12, getDocumentSchema());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(13, getDeprecationInfo());
}
if (modelType_
!= com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType.MODEL_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(15, modelType_);
}
getUnknownFields().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_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (state_
!= com.google.cloud.documentai.v1beta3.ProcessorVersion.State.STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLatestEvaluation());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, kmsKeyName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyVersionName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, kmsKeyVersionName_);
}
if (googleManaged_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, googleManaged_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDocumentSchema());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getDeprecationInfo());
}
if (modelType_
!= com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType.MODEL_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, modelType_);
}
size += getUnknownFields().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.ProcessorVersion)) {
return super.equals(obj);
}
com.google.cloud.documentai.v1beta3.ProcessorVersion other =
(com.google.cloud.documentai.v1beta3.ProcessorVersion) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (hasDocumentSchema() != other.hasDocumentSchema()) return false;
if (hasDocumentSchema()) {
if (!getDocumentSchema().equals(other.getDocumentSchema())) return false;
}
if (state_ != other.state_) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (hasLatestEvaluation() != other.hasLatestEvaluation()) return false;
if (hasLatestEvaluation()) {
if (!getLatestEvaluation().equals(other.getLatestEvaluation())) return false;
}
if (!getKmsKeyName().equals(other.getKmsKeyName())) return false;
if (!getKmsKeyVersionName().equals(other.getKmsKeyVersionName())) return false;
if (getGoogleManaged() != other.getGoogleManaged()) return false;
if (hasDeprecationInfo() != other.hasDeprecationInfo()) return false;
if (hasDeprecationInfo()) {
if (!getDeprecationInfo().equals(other.getDeprecationInfo())) return false;
}
if (modelType_ != other.modelType_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
if (hasDocumentSchema()) {
hash = (37 * hash) + DOCUMENT_SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getDocumentSchema().hashCode();
}
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
if (hasLatestEvaluation()) {
hash = (37 * hash) + LATEST_EVALUATION_FIELD_NUMBER;
hash = (53 * hash) + getLatestEvaluation().hashCode();
}
hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getKmsKeyName().hashCode();
hash = (37 * hash) + KMS_KEY_VERSION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getKmsKeyVersionName().hashCode();
hash = (37 * hash) + GOOGLE_MANAGED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGoogleManaged());
if (hasDeprecationInfo()) {
hash = (37 * hash) + DEPRECATION_INFO_FIELD_NUMBER;
hash = (53 * hash) + getDeprecationInfo().hashCode();
}
hash = (37 * hash) + MODEL_TYPE_FIELD_NUMBER;
hash = (53 * hash) + modelType_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion 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.ProcessorVersion parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion 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.ProcessorVersion parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion 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.ProcessorVersion parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion 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.ProcessorVersion parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion 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.ProcessorVersion 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.ProcessorVersion 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.ProcessorVersion 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;
}
/**
*
*
*
* A processor version is an implementation of a processor. Each processor
* can have multiple versions, pretrained by Google internally or uptrained
* by the customer. A processor can only have one default version at a time.
* Its document-processing behavior is defined by that version.
*
*
* Protobuf type {@code google.cloud.documentai.v1beta3.ProcessorVersion}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ProcessorVersion)
com.google.cloud.documentai.v1beta3.ProcessorVersionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.documentai.v1beta3.ProcessorVersion.class,
com.google.cloud.documentai.v1beta3.ProcessorVersion.Builder.class);
}
// Construct using com.google.cloud.documentai.v1beta3.ProcessorVersion.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getDocumentSchemaFieldBuilder();
getCreateTimeFieldBuilder();
getLatestEvaluationFieldBuilder();
getDeprecationInfoFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
documentSchema_ = null;
if (documentSchemaBuilder_ != null) {
documentSchemaBuilder_.dispose();
documentSchemaBuilder_ = null;
}
state_ = 0;
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
latestEvaluation_ = null;
if (latestEvaluationBuilder_ != null) {
latestEvaluationBuilder_.dispose();
latestEvaluationBuilder_ = null;
}
kmsKeyName_ = "";
kmsKeyVersionName_ = "";
googleManaged_ = false;
deprecationInfo_ = null;
if (deprecationInfoBuilder_ != null) {
deprecationInfoBuilder_.dispose();
deprecationInfoBuilder_ = null;
}
modelType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.documentai.v1beta3.DocumentAiProcessor
.internal_static_google_cloud_documentai_v1beta3_ProcessorVersion_descriptor;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion getDefaultInstanceForType() {
return com.google.cloud.documentai.v1beta3.ProcessorVersion.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion build() {
com.google.cloud.documentai.v1beta3.ProcessorVersion result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion buildPartial() {
com.google.cloud.documentai.v1beta3.ProcessorVersion result =
new com.google.cloud.documentai.v1beta3.ProcessorVersion(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.documentai.v1beta3.ProcessorVersion result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.documentSchema_ =
documentSchemaBuilder_ == null ? documentSchema_ : documentSchemaBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.latestEvaluation_ =
latestEvaluationBuilder_ == null ? latestEvaluation_ : latestEvaluationBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.kmsKeyName_ = kmsKeyName_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.kmsKeyVersionName_ = kmsKeyVersionName_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.googleManaged_ = googleManaged_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.deprecationInfo_ =
deprecationInfoBuilder_ == null ? deprecationInfo_ : deprecationInfoBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.modelType_ = modelType_;
}
result.bitField0_ |= to_bitField0_;
}
@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.ProcessorVersion) {
return mergeFrom((com.google.cloud.documentai.v1beta3.ProcessorVersion) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ProcessorVersion other) {
if (other == com.google.cloud.documentai.v1beta3.ProcessorVersion.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasDocumentSchema()) {
mergeDocumentSchema(other.getDocumentSchema());
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.hasLatestEvaluation()) {
mergeLatestEvaluation(other.getLatestEvaluation());
}
if (!other.getKmsKeyName().isEmpty()) {
kmsKeyName_ = other.kmsKeyName_;
bitField0_ |= 0x00000040;
onChanged();
}
if (!other.getKmsKeyVersionName().isEmpty()) {
kmsKeyVersionName_ = other.kmsKeyVersionName_;
bitField0_ |= 0x00000080;
onChanged();
}
if (other.getGoogleManaged() != false) {
setGoogleManaged(other.getGoogleManaged());
}
if (other.hasDeprecationInfo()) {
mergeDeprecationInfo(other.getDeprecationInfo());
}
if (other.modelType_ != 0) {
setModelTypeValue(other.getModelTypeValue());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 48:
{
state_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 48
case 58:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 58
case 66:
{
input.readMessage(
getLatestEvaluationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 66
case 74:
{
kmsKeyName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 74
case 82:
{
kmsKeyVersionName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 82
case 88:
{
googleManaged_ = input.readBool();
bitField0_ |= 0x00000100;
break;
} // case 88
case 98:
{
input.readMessage(getDocumentSchemaFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 98
case 106:
{
input.readMessage(getDeprecationInfoFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 106
case 120:
{
modelType_ = input.readEnum();
bitField0_ |= 0x00000400;
break;
} // case 120
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @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;
}
}
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @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;
}
}
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The resource name of the processor version.
* Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
*
*
* string name = 1;
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The display name of the processor version.
*
*
* string display_name = 2;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.cloud.documentai.v1beta3.DocumentSchema documentSchema_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.DocumentSchema,
com.google.cloud.documentai.v1beta3.DocumentSchema.Builder,
com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder>
documentSchemaBuilder_;
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*
* @return Whether the documentSchema field is set.
*/
public boolean hasDocumentSchema() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*
* @return The documentSchema.
*/
public com.google.cloud.documentai.v1beta3.DocumentSchema getDocumentSchema() {
if (documentSchemaBuilder_ == null) {
return documentSchema_ == null
? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance()
: documentSchema_;
} else {
return documentSchemaBuilder_.getMessage();
}
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
public Builder setDocumentSchema(com.google.cloud.documentai.v1beta3.DocumentSchema value) {
if (documentSchemaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
documentSchema_ = value;
} else {
documentSchemaBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
public Builder setDocumentSchema(
com.google.cloud.documentai.v1beta3.DocumentSchema.Builder builderForValue) {
if (documentSchemaBuilder_ == null) {
documentSchema_ = builderForValue.build();
} else {
documentSchemaBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
public Builder mergeDocumentSchema(com.google.cloud.documentai.v1beta3.DocumentSchema value) {
if (documentSchemaBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& documentSchema_ != null
&& documentSchema_
!= com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance()) {
getDocumentSchemaBuilder().mergeFrom(value);
} else {
documentSchema_ = value;
}
} else {
documentSchemaBuilder_.mergeFrom(value);
}
if (documentSchema_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
public Builder clearDocumentSchema() {
bitField0_ = (bitField0_ & ~0x00000004);
documentSchema_ = null;
if (documentSchemaBuilder_ != null) {
documentSchemaBuilder_.dispose();
documentSchemaBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
public com.google.cloud.documentai.v1beta3.DocumentSchema.Builder getDocumentSchemaBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getDocumentSchemaFieldBuilder().getBuilder();
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder
getDocumentSchemaOrBuilder() {
if (documentSchemaBuilder_ != null) {
return documentSchemaBuilder_.getMessageOrBuilder();
} else {
return documentSchema_ == null
? com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance()
: documentSchema_;
}
}
/**
*
*
*
* The schema of the processor version. Describes the output.
*
*
* .google.cloud.documentai.v1beta3.DocumentSchema document_schema = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.DocumentSchema,
com.google.cloud.documentai.v1beta3.DocumentSchema.Builder,
com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder>
getDocumentSchemaFieldBuilder() {
if (documentSchemaBuilder_ == null) {
documentSchemaBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.DocumentSchema,
com.google.cloud.documentai.v1beta3.DocumentSchema.Builder,
com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder>(
getDocumentSchema(), getParentForChildren(), isClean());
documentSchema_ = null;
}
return documentSchemaBuilder_;
}
private int state_ = 0;
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.State getState() {
com.google.cloud.documentai.v1beta3.ProcessorVersion.State result =
com.google.cloud.documentai.v1beta3.ProcessorVersion.State.forNumber(state_);
return result == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.documentai.v1beta3.ProcessorVersion.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The state of the processor version.
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000008);
state_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
createTimeBuilder_;
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*
* @return The createTime.
*/
public com.google.protobuf.Timestamp getCreateTime() {
if (createTimeBuilder_ == null) {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
} else {
return createTimeBuilder_.getMessage();
}
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
public Builder setCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createTime_ = value;
} else {
createTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (createTimeBuilder_ == null) {
createTime_ = builderForValue.build();
} else {
createTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& createTime_ != null
&& createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCreateTimeBuilder().mergeFrom(value);
} else {
createTime_ = value;
}
} else {
createTimeBuilder_.mergeFrom(value);
}
if (createTime_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
public Builder clearCreateTime() {
bitField0_ = (bitField0_ & ~0x00000010);
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getCreateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
if (createTimeBuilder_ != null) {
return createTimeBuilder_.getMessageOrBuilder();
} else {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
}
}
/**
*
*
*
* The time the processor version was created.
*
*
* .google.protobuf.Timestamp create_time = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder() {
if (createTimeBuilder_ == null) {
createTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCreateTime(), getParentForChildren(), isClean());
createTime_ = null;
}
return createTimeBuilder_;
}
private com.google.cloud.documentai.v1beta3.EvaluationReference latestEvaluation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.EvaluationReference,
com.google.cloud.documentai.v1beta3.EvaluationReference.Builder,
com.google.cloud.documentai.v1beta3.EvaluationReferenceOrBuilder>
latestEvaluationBuilder_;
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*
* @return Whether the latestEvaluation field is set.
*/
public boolean hasLatestEvaluation() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*
* @return The latestEvaluation.
*/
public com.google.cloud.documentai.v1beta3.EvaluationReference getLatestEvaluation() {
if (latestEvaluationBuilder_ == null) {
return latestEvaluation_ == null
? com.google.cloud.documentai.v1beta3.EvaluationReference.getDefaultInstance()
: latestEvaluation_;
} else {
return latestEvaluationBuilder_.getMessage();
}
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
public Builder setLatestEvaluation(
com.google.cloud.documentai.v1beta3.EvaluationReference value) {
if (latestEvaluationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
latestEvaluation_ = value;
} else {
latestEvaluationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
public Builder setLatestEvaluation(
com.google.cloud.documentai.v1beta3.EvaluationReference.Builder builderForValue) {
if (latestEvaluationBuilder_ == null) {
latestEvaluation_ = builderForValue.build();
} else {
latestEvaluationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
public Builder mergeLatestEvaluation(
com.google.cloud.documentai.v1beta3.EvaluationReference value) {
if (latestEvaluationBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& latestEvaluation_ != null
&& latestEvaluation_
!= com.google.cloud.documentai.v1beta3.EvaluationReference.getDefaultInstance()) {
getLatestEvaluationBuilder().mergeFrom(value);
} else {
latestEvaluation_ = value;
}
} else {
latestEvaluationBuilder_.mergeFrom(value);
}
if (latestEvaluation_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
public Builder clearLatestEvaluation() {
bitField0_ = (bitField0_ & ~0x00000020);
latestEvaluation_ = null;
if (latestEvaluationBuilder_ != null) {
latestEvaluationBuilder_.dispose();
latestEvaluationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
public com.google.cloud.documentai.v1beta3.EvaluationReference.Builder
getLatestEvaluationBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getLatestEvaluationFieldBuilder().getBuilder();
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
public com.google.cloud.documentai.v1beta3.EvaluationReferenceOrBuilder
getLatestEvaluationOrBuilder() {
if (latestEvaluationBuilder_ != null) {
return latestEvaluationBuilder_.getMessageOrBuilder();
} else {
return latestEvaluation_ == null
? com.google.cloud.documentai.v1beta3.EvaluationReference.getDefaultInstance()
: latestEvaluation_;
}
}
/**
*
*
*
* The most recently invoked evaluation for the processor version.
*
*
* .google.cloud.documentai.v1beta3.EvaluationReference latest_evaluation = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.EvaluationReference,
com.google.cloud.documentai.v1beta3.EvaluationReference.Builder,
com.google.cloud.documentai.v1beta3.EvaluationReferenceOrBuilder>
getLatestEvaluationFieldBuilder() {
if (latestEvaluationBuilder_ == null) {
latestEvaluationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.EvaluationReference,
com.google.cloud.documentai.v1beta3.EvaluationReference.Builder,
com.google.cloud.documentai.v1beta3.EvaluationReferenceOrBuilder>(
getLatestEvaluation(), getParentForChildren(), isClean());
latestEvaluation_ = null;
}
return latestEvaluationBuilder_;
}
private java.lang.Object kmsKeyName_ = "";
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @return The kmsKeyName.
*/
public java.lang.String getKmsKeyName() {
java.lang.Object ref = kmsKeyName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kmsKeyName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @return The bytes for kmsKeyName.
*/
public com.google.protobuf.ByteString getKmsKeyNameBytes() {
java.lang.Object ref = kmsKeyName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKeyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @param value The kmsKeyName to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kmsKeyName_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @return This builder for chaining.
*/
public Builder clearKmsKeyName() {
kmsKeyName_ = getDefaultInstance().getKmsKeyName();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* The KMS key name used for encryption.
*
*
* string kms_key_name = 9;
*
* @param value The bytes for kmsKeyName to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kmsKeyName_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private java.lang.Object kmsKeyVersionName_ = "";
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @return The kmsKeyVersionName.
*/
public java.lang.String getKmsKeyVersionName() {
java.lang.Object ref = kmsKeyVersionName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kmsKeyVersionName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @return The bytes for kmsKeyVersionName.
*/
public com.google.protobuf.ByteString getKmsKeyVersionNameBytes() {
java.lang.Object ref = kmsKeyVersionName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKeyVersionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @param value The kmsKeyVersionName to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyVersionName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kmsKeyVersionName_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @return This builder for chaining.
*/
public Builder clearKmsKeyVersionName() {
kmsKeyVersionName_ = getDefaultInstance().getKmsKeyVersionName();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* The KMS key version with which data is encrypted.
*
*
* string kms_key_version_name = 10;
*
* @param value The bytes for kmsKeyVersionName to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyVersionNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kmsKeyVersionName_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private boolean googleManaged_;
/**
*
*
*
* Output only. Denotes that this `ProcessorVersion` is managed by Google.
*
*
* bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The googleManaged.
*/
@java.lang.Override
public boolean getGoogleManaged() {
return googleManaged_;
}
/**
*
*
*
* Output only. Denotes that this `ProcessorVersion` is managed by Google.
*
*
* bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The googleManaged to set.
* @return This builder for chaining.
*/
public Builder setGoogleManaged(boolean value) {
googleManaged_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. Denotes that this `ProcessorVersion` is managed by Google.
*
*
* bool google_managed = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearGoogleManaged() {
bitField0_ = (bitField0_ & ~0x00000100);
googleManaged_ = false;
onChanged();
return this;
}
private com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecationInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfoOrBuilder>
deprecationInfoBuilder_;
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*
* @return Whether the deprecationInfo field is set.
*/
public boolean hasDeprecationInfo() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*
* @return The deprecationInfo.
*/
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
getDeprecationInfo() {
if (deprecationInfoBuilder_ == null) {
return deprecationInfo_ == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
.getDefaultInstance()
: deprecationInfo_;
} else {
return deprecationInfoBuilder_.getMessage();
}
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
public Builder setDeprecationInfo(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo value) {
if (deprecationInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
deprecationInfo_ = value;
} else {
deprecationInfoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
public Builder setDeprecationInfo(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder
builderForValue) {
if (deprecationInfoBuilder_ == null) {
deprecationInfo_ = builderForValue.build();
} else {
deprecationInfoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
public Builder mergeDeprecationInfo(
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo value) {
if (deprecationInfoBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)
&& deprecationInfo_ != null
&& deprecationInfo_
!= com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
.getDefaultInstance()) {
getDeprecationInfoBuilder().mergeFrom(value);
} else {
deprecationInfo_ = value;
}
} else {
deprecationInfoBuilder_.mergeFrom(value);
}
if (deprecationInfo_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
public Builder clearDeprecationInfo() {
bitField0_ = (bitField0_ & ~0x00000200);
deprecationInfo_ = null;
if (deprecationInfoBuilder_ != null) {
deprecationInfoBuilder_.dispose();
deprecationInfoBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder
getDeprecationInfoBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getDeprecationInfoFieldBuilder().getBuilder();
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
public com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfoOrBuilder
getDeprecationInfoOrBuilder() {
if (deprecationInfoBuilder_ != null) {
return deprecationInfoBuilder_.getMessageOrBuilder();
} else {
return deprecationInfo_ == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo
.getDefaultInstance()
: deprecationInfo_;
}
}
/**
*
*
*
* If set, information about the eventual deprecation of this version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo deprecation_info = 13;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfoOrBuilder>
getDeprecationInfoFieldBuilder() {
if (deprecationInfoBuilder_ == null) {
deprecationInfoBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfo.Builder,
com.google.cloud.documentai.v1beta3.ProcessorVersion.DeprecationInfoOrBuilder>(
getDeprecationInfo(), getParentForChildren(), isClean());
deprecationInfo_ = null;
}
return deprecationInfoBuilder_;
}
private int modelType_ = 0;
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for modelType.
*/
@java.lang.Override
public int getModelTypeValue() {
return modelType_;
}
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for modelType to set.
* @return This builder for chaining.
*/
public Builder setModelTypeValue(int value) {
modelType_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The modelType.
*/
@java.lang.Override
public com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType getModelType() {
com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType result =
com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType.forNumber(modelType_);
return result == null
? com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The modelType to set.
* @return This builder for chaining.
*/
public Builder setModelType(
com.google.cloud.documentai.v1beta3.ProcessorVersion.ModelType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000400;
modelType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The model type of this processor version.
*
*
*
* .google.cloud.documentai.v1beta3.ProcessorVersion.ModelType model_type = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearModelType() {
bitField0_ = (bitField0_ & ~0x00000400);
modelType_ = 0;
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.ProcessorVersion)
}
// @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ProcessorVersion)
private static final com.google.cloud.documentai.v1beta3.ProcessorVersion DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ProcessorVersion();
}
public static com.google.cloud.documentai.v1beta3.ProcessorVersion getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProcessorVersion parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.ProcessorVersion getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy