Class ProcessorType.Builder (2.41.0)

public static final class ProcessorType.Builder extends GeneratedMessageV3.Builder<ProcessorType.Builder> implements ProcessorTypeOrBuilder

A processor type is responsible for performing a certain document understanding task on a certain type of document.

Protobuf type google.cloud.documentai.v1.ProcessorType

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAvailableLocations(Iterable<? extends ProcessorType.LocationInfo> values)

public ProcessorType.Builder addAllAvailableLocations(Iterable<? extends ProcessorType.LocationInfo> values)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1.ProcessorType.LocationInfo>
Returns
TypeDescription
ProcessorType.Builder

addAllSampleDocumentUris(Iterable<String> values)

public ProcessorType.Builder addAllSampleDocumentUris(Iterable<String> values)

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Parameter
NameDescription
valuesIterable<String>

The sampleDocumentUris to add.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

addAvailableLocations(ProcessorType.LocationInfo value)

public ProcessorType.Builder addAvailableLocations(ProcessorType.LocationInfo value)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
valueProcessorType.LocationInfo
Returns
TypeDescription
ProcessorType.Builder

addAvailableLocations(ProcessorType.LocationInfo.Builder builderForValue)

public ProcessorType.Builder addAvailableLocations(ProcessorType.LocationInfo.Builder builderForValue)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
builderForValueProcessorType.LocationInfo.Builder
Returns
TypeDescription
ProcessorType.Builder

addAvailableLocations(int index, ProcessorType.LocationInfo value)

public ProcessorType.Builder addAvailableLocations(int index, ProcessorType.LocationInfo value)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameters
NameDescription
indexint
valueProcessorType.LocationInfo
Returns
TypeDescription
ProcessorType.Builder

addAvailableLocations(int index, ProcessorType.LocationInfo.Builder builderForValue)

public ProcessorType.Builder addAvailableLocations(int index, ProcessorType.LocationInfo.Builder builderForValue)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameters
NameDescription
indexint
builderForValueProcessorType.LocationInfo.Builder
Returns
TypeDescription
ProcessorType.Builder

addAvailableLocationsBuilder()

public ProcessorType.LocationInfo.Builder addAvailableLocationsBuilder()

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Returns
TypeDescription
ProcessorType.LocationInfo.Builder

addAvailableLocationsBuilder(int index)

public ProcessorType.LocationInfo.Builder addAvailableLocationsBuilder(int index)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorType.LocationInfo.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProcessorType.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProcessorType.Builder
Overrides

addSampleDocumentUris(String value)

public ProcessorType.Builder addSampleDocumentUris(String value)

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Parameter
NameDescription
valueString

The sampleDocumentUris to add.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

addSampleDocumentUrisBytes(ByteString value)

public ProcessorType.Builder addSampleDocumentUrisBytes(ByteString value)

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Parameter
NameDescription
valueByteString

The bytes of the sampleDocumentUris to add.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

build()

public ProcessorType build()
Returns
TypeDescription
ProcessorType

buildPartial()

public ProcessorType buildPartial()
Returns
TypeDescription
ProcessorType

clear()

public ProcessorType.Builder clear()
Returns
TypeDescription
ProcessorType.Builder
Overrides

clearAllowCreation()

public ProcessorType.Builder clearAllowCreation()

Whether the processor type allows creation. If true, users can create a processor of this processor type. Otherwise, users need to request access.

bool allow_creation = 6;

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

clearAvailableLocations()

public ProcessorType.Builder clearAvailableLocations()

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Returns
TypeDescription
ProcessorType.Builder

clearCategory()

public ProcessorType.Builder clearCategory()

The processor category, used by UI to group processor types.

string category = 3;

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ProcessorType.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ProcessorType.Builder
Overrides

clearLaunchStage()

public ProcessorType.Builder clearLaunchStage()

Launch stage of the processor type

.google.api.LaunchStage launch_stage = 8;

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

clearName()

public ProcessorType.Builder clearName()

The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}

string name = 1;

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ProcessorType.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ProcessorType.Builder
Overrides

clearSampleDocumentUris()

public ProcessorType.Builder clearSampleDocumentUris()

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

clearType()

public ProcessorType.Builder clearType()

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR.

string type = 2;

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

clone()

public ProcessorType.Builder clone()
Returns
TypeDescription
ProcessorType.Builder
Overrides

getAllowCreation()

public boolean getAllowCreation()

Whether the processor type allows creation. If true, users can create a processor of this processor type. Otherwise, users need to request access.

bool allow_creation = 6;

Returns
TypeDescription
boolean

The allowCreation.

getAvailableLocations(int index)

public ProcessorType.LocationInfo getAvailableLocations(int index)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorType.LocationInfo

getAvailableLocationsBuilder(int index)

public ProcessorType.LocationInfo.Builder getAvailableLocationsBuilder(int index)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorType.LocationInfo.Builder

getAvailableLocationsBuilderList()

public List<ProcessorType.LocationInfo.Builder> getAvailableLocationsBuilderList()

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Returns
TypeDescription
List<Builder>

getAvailableLocationsCount()

public int getAvailableLocationsCount()

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Returns
TypeDescription
int

getAvailableLocationsList()

public List<ProcessorType.LocationInfo> getAvailableLocationsList()

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Returns
TypeDescription
List<LocationInfo>

getAvailableLocationsOrBuilder(int index)

public ProcessorType.LocationInfoOrBuilder getAvailableLocationsOrBuilder(int index)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorType.LocationInfoOrBuilder

getAvailableLocationsOrBuilderList()

public List<? extends ProcessorType.LocationInfoOrBuilder> getAvailableLocationsOrBuilderList()

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1.ProcessorType.LocationInfoOrBuilder>

getCategory()

public String getCategory()

The processor category, used by UI to group processor types.

string category = 3;

Returns
TypeDescription
String

The category.

getCategoryBytes()

public ByteString getCategoryBytes()

The processor category, used by UI to group processor types.

string category = 3;

Returns
TypeDescription
ByteString

The bytes for category.

getDefaultInstanceForType()

public ProcessorType getDefaultInstanceForType()
Returns
TypeDescription
ProcessorType

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLaunchStage()

public LaunchStage getLaunchStage()

Launch stage of the processor type

.google.api.LaunchStage launch_stage = 8;

Returns
TypeDescription
com.google.api.LaunchStage

The launchStage.

getLaunchStageValue()

public int getLaunchStageValue()

Launch stage of the processor type

.google.api.LaunchStage launch_stage = 8;

Returns
TypeDescription
int

The enum numeric value on the wire for launchStage.

getName()

public String getName()

The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getSampleDocumentUris(int index)

public String getSampleDocumentUris(int index)

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The sampleDocumentUris at the given index.

getSampleDocumentUrisBytes(int index)

public ByteString getSampleDocumentUrisBytes(int index)

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the sampleDocumentUris at the given index.

getSampleDocumentUrisCount()

public int getSampleDocumentUrisCount()

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Returns
TypeDescription
int

The count of sampleDocumentUris.

getSampleDocumentUrisList()

public ProtocolStringList getSampleDocumentUrisList()

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Returns
TypeDescription
ProtocolStringList

A list containing the sampleDocumentUris.

getType()

public String getType()

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR.

string type = 2;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR.

string type = 2;

Returns
TypeDescription
ByteString

The bytes for type.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ProcessorType other)

public ProcessorType.Builder mergeFrom(ProcessorType other)
Parameter
NameDescription
otherProcessorType
Returns
TypeDescription
ProcessorType.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProcessorType.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProcessorType.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ProcessorType.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ProcessorType.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProcessorType.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProcessorType.Builder
Overrides

removeAvailableLocations(int index)

public ProcessorType.Builder removeAvailableLocations(int index)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorType.Builder

setAllowCreation(boolean value)

public ProcessorType.Builder setAllowCreation(boolean value)

Whether the processor type allows creation. If true, users can create a processor of this processor type. Otherwise, users need to request access.

bool allow_creation = 6;

Parameter
NameDescription
valueboolean

The allowCreation to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setAvailableLocations(int index, ProcessorType.LocationInfo value)

public ProcessorType.Builder setAvailableLocations(int index, ProcessorType.LocationInfo value)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameters
NameDescription
indexint
valueProcessorType.LocationInfo
Returns
TypeDescription
ProcessorType.Builder

setAvailableLocations(int index, ProcessorType.LocationInfo.Builder builderForValue)

public ProcessorType.Builder setAvailableLocations(int index, ProcessorType.LocationInfo.Builder builderForValue)

The locations in which this processor is available.

repeated .google.cloud.documentai.v1.ProcessorType.LocationInfo available_locations = 4;

Parameters
NameDescription
indexint
builderForValueProcessorType.LocationInfo.Builder
Returns
TypeDescription
ProcessorType.Builder

setCategory(String value)

public ProcessorType.Builder setCategory(String value)

The processor category, used by UI to group processor types.

string category = 3;

Parameter
NameDescription
valueString

The category to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setCategoryBytes(ByteString value)

public ProcessorType.Builder setCategoryBytes(ByteString value)

The processor category, used by UI to group processor types.

string category = 3;

Parameter
NameDescription
valueByteString

The bytes for category to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ProcessorType.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProcessorType.Builder
Overrides

setLaunchStage(LaunchStage value)

public ProcessorType.Builder setLaunchStage(LaunchStage value)

Launch stage of the processor type

.google.api.LaunchStage launch_stage = 8;

Parameter
NameDescription
valuecom.google.api.LaunchStage

The launchStage to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setLaunchStageValue(int value)

public ProcessorType.Builder setLaunchStageValue(int value)

Launch stage of the processor type

.google.api.LaunchStage launch_stage = 8;

Parameter
NameDescription
valueint

The enum numeric value on the wire for launchStage to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setName(String value)

public ProcessorType.Builder setName(String value)

The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ProcessorType.Builder setNameBytes(ByteString value)

The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ProcessorType.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ProcessorType.Builder
Overrides

setSampleDocumentUris(int index, String value)

public ProcessorType.Builder setSampleDocumentUris(int index, String value)

A set of Cloud Storage URIs of sample documents for this processor.

repeated string sample_document_uris = 9;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The sampleDocumentUris to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setType(String value)

public ProcessorType.Builder setType(String value)

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR.

string type = 2;

Parameter
NameDescription
valueString

The type to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public ProcessorType.Builder setTypeBytes(ByteString value)

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR.

string type = 2;

Parameter
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
ProcessorType.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ProcessorType.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProcessorType.Builder
Overrides