Class Barcode.Builder (2.48.0)

public static final class Barcode.Builder extends GeneratedMessageV3.Builder<Barcode.Builder> implements BarcodeOrBuilder

Encodes the detailed information of a barcode.

Protobuf type google.cloud.documentai.v1beta3.Barcode

Implements

BarcodeOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Barcode.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Barcode.Builder
Overrides

build()

public Barcode build()
Returns
Type Description
Barcode

buildPartial()

public Barcode buildPartial()
Returns
Type Description
Barcode

clear()

public Barcode.Builder clear()
Returns
Type Description
Barcode.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Barcode.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Barcode.Builder
Overrides

clearFormat()

public Barcode.Builder clearFormat()

Format of a barcode. The supported formats are:

  • CODE_128: Code 128 type.
  • CODE_39: Code 39 type.
  • CODE_93: Code 93 type.
  • CODABAR: Codabar type.
  • DATA_MATRIX: 2D Data Matrix type.
  • ITF: ITF type.
  • EAN_13: EAN-13 type.
  • EAN_8: EAN-8 type.
  • QR_CODE: 2D QR code type.
  • UPC_A: UPC-A type.
  • UPC_E: UPC-E type.
  • PDF417: PDF417 type.
  • AZTEC: 2D Aztec code type.
  • DATABAR: GS1 DataBar code type.

string format = 1;

Returns
Type Description
Barcode.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Barcode.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Barcode.Builder
Overrides

clearRawValue()

public Barcode.Builder clearRawValue()

Raw value encoded in the barcode. For example: 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.

string raw_value = 3;

Returns
Type Description
Barcode.Builder

This builder for chaining.

clearValueFormat()

public Barcode.Builder clearValueFormat()

Value format describes the format of the value that a barcode encodes. The supported formats are:

  • CONTACT_INFO: Contact information.
  • EMAIL: Email address.
  • ISBN: ISBN identifier.
  • PHONE: Phone number.
  • PRODUCT: Product.
  • SMS: SMS message.
  • TEXT: Text string.
  • URL: URL address.
  • WIFI: Wifi information.
  • GEO: Geo-localization.
  • CALENDAR_EVENT: Calendar event.
  • DRIVER_LICENSE: Driver's license.

string value_format = 2;

Returns
Type Description
Barcode.Builder

This builder for chaining.

clone()

public Barcode.Builder clone()
Returns
Type Description
Barcode.Builder
Overrides

getDefaultInstanceForType()

public Barcode getDefaultInstanceForType()
Returns
Type Description
Barcode

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFormat()

public String getFormat()

Format of a barcode. The supported formats are:

  • CODE_128: Code 128 type.
  • CODE_39: Code 39 type.
  • CODE_93: Code 93 type.
  • CODABAR: Codabar type.
  • DATA_MATRIX: 2D Data Matrix type.
  • ITF: ITF type.
  • EAN_13: EAN-13 type.
  • EAN_8: EAN-8 type.
  • QR_CODE: 2D QR code type.
  • UPC_A: UPC-A type.
  • UPC_E: UPC-E type.
  • PDF417: PDF417 type.
  • AZTEC: 2D Aztec code type.
  • DATABAR: GS1 DataBar code type.

string format = 1;

Returns
Type Description
String

The format.

getFormatBytes()

public ByteString getFormatBytes()

Format of a barcode. The supported formats are:

  • CODE_128: Code 128 type.
  • CODE_39: Code 39 type.
  • CODE_93: Code 93 type.
  • CODABAR: Codabar type.
  • DATA_MATRIX: 2D Data Matrix type.
  • ITF: ITF type.
  • EAN_13: EAN-13 type.
  • EAN_8: EAN-8 type.
  • QR_CODE: 2D QR code type.
  • UPC_A: UPC-A type.
  • UPC_E: UPC-E type.
  • PDF417: PDF417 type.
  • AZTEC: 2D Aztec code type.
  • DATABAR: GS1 DataBar code type.

string format = 1;

Returns
Type Description
ByteString

The bytes for format.

getRawValue()

public String getRawValue()

Raw value encoded in the barcode. For example: 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.

string raw_value = 3;

Returns
Type Description
String

The rawValue.

getRawValueBytes()

public ByteString getRawValueBytes()

Raw value encoded in the barcode. For example: 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.

string raw_value = 3;

Returns
Type Description
ByteString

The bytes for rawValue.

getValueFormat()

public String getValueFormat()

Value format describes the format of the value that a barcode encodes. The supported formats are:

  • CONTACT_INFO: Contact information.
  • EMAIL: Email address.
  • ISBN: ISBN identifier.
  • PHONE: Phone number.
  • PRODUCT: Product.
  • SMS: SMS message.
  • TEXT: Text string.
  • URL: URL address.
  • WIFI: Wifi information.
  • GEO: Geo-localization.
  • CALENDAR_EVENT: Calendar event.
  • DRIVER_LICENSE: Driver's license.

string value_format = 2;

Returns
Type Description
String

The valueFormat.

getValueFormatBytes()

public ByteString getValueFormatBytes()

Value format describes the format of the value that a barcode encodes. The supported formats are:

  • CONTACT_INFO: Contact information.
  • EMAIL: Email address.
  • ISBN: ISBN identifier.
  • PHONE: Phone number.
  • PRODUCT: Product.
  • SMS: SMS message.
  • TEXT: Text string.
  • URL: URL address.
  • WIFI: Wifi information.
  • GEO: Geo-localization.
  • CALENDAR_EVENT: Calendar event.
  • DRIVER_LICENSE: Driver's license.

string value_format = 2;

Returns
Type Description
ByteString

The bytes for valueFormat.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Barcode other)

public Barcode.Builder mergeFrom(Barcode other)
Parameter
Name Description
other Barcode
Returns
Type Description
Barcode.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Barcode.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Barcode.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Barcode.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Barcode.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Barcode.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Barcode.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Barcode.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Barcode.Builder
Overrides

setFormat(String value)

public Barcode.Builder setFormat(String value)

Format of a barcode. The supported formats are:

  • CODE_128: Code 128 type.
  • CODE_39: Code 39 type.
  • CODE_93: Code 93 type.
  • CODABAR: Codabar type.
  • DATA_MATRIX: 2D Data Matrix type.
  • ITF: ITF type.
  • EAN_13: EAN-13 type.
  • EAN_8: EAN-8 type.
  • QR_CODE: 2D QR code type.
  • UPC_A: UPC-A type.
  • UPC_E: UPC-E type.
  • PDF417: PDF417 type.
  • AZTEC: 2D Aztec code type.
  • DATABAR: GS1 DataBar code type.

string format = 1;

Parameter
Name Description
value String

The format to set.

Returns
Type Description
Barcode.Builder

This builder for chaining.

setFormatBytes(ByteString value)

public Barcode.Builder setFormatBytes(ByteString value)

Format of a barcode. The supported formats are:

  • CODE_128: Code 128 type.
  • CODE_39: Code 39 type.
  • CODE_93: Code 93 type.
  • CODABAR: Codabar type.
  • DATA_MATRIX: 2D Data Matrix type.
  • ITF: ITF type.
  • EAN_13: EAN-13 type.
  • EAN_8: EAN-8 type.
  • QR_CODE: 2D QR code type.
  • UPC_A: UPC-A type.
  • UPC_E: UPC-E type.
  • PDF417: PDF417 type.
  • AZTEC: 2D Aztec code type.
  • DATABAR: GS1 DataBar code type.

string format = 1;

Parameter
Name Description
value ByteString

The bytes for format to set.

Returns
Type Description
Barcode.Builder

This builder for chaining.

setRawValue(String value)

public Barcode.Builder setRawValue(String value)

Raw value encoded in the barcode. For example: 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.

string raw_value = 3;

Parameter
Name Description
value String

The rawValue to set.

Returns
Type Description
Barcode.Builder

This builder for chaining.

setRawValueBytes(ByteString value)

public Barcode.Builder setRawValueBytes(ByteString value)

Raw value encoded in the barcode. For example: 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.

string raw_value = 3;

Parameter
Name Description
value ByteString

The bytes for rawValue to set.

Returns
Type Description
Barcode.Builder

This builder for chaining.

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

public Barcode.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Barcode.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Barcode.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Barcode.Builder
Overrides

setValueFormat(String value)

public Barcode.Builder setValueFormat(String value)

Value format describes the format of the value that a barcode encodes. The supported formats are:

  • CONTACT_INFO: Contact information.
  • EMAIL: Email address.
  • ISBN: ISBN identifier.
  • PHONE: Phone number.
  • PRODUCT: Product.
  • SMS: SMS message.
  • TEXT: Text string.
  • URL: URL address.
  • WIFI: Wifi information.
  • GEO: Geo-localization.
  • CALENDAR_EVENT: Calendar event.
  • DRIVER_LICENSE: Driver's license.

string value_format = 2;

Parameter
Name Description
value String

The valueFormat to set.

Returns
Type Description
Barcode.Builder

This builder for chaining.

setValueFormatBytes(ByteString value)

public Barcode.Builder setValueFormatBytes(ByteString value)

Value format describes the format of the value that a barcode encodes. The supported formats are:

  • CONTACT_INFO: Contact information.
  • EMAIL: Email address.
  • ISBN: ISBN identifier.
  • PHONE: Phone number.
  • PRODUCT: Product.
  • SMS: SMS message.
  • TEXT: Text string.
  • URL: URL address.
  • WIFI: Wifi information.
  • GEO: Geo-localization.
  • CALENDAR_EVENT: Calendar event.
  • DRIVER_LICENSE: Driver's license.

string value_format = 2;

Parameter
Name Description
value ByteString

The bytes for valueFormat to set.

Returns
Type Description
Barcode.Builder

This builder for chaining.