Class Barcode.Builder (2.19.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Barcode build()
Returns
TypeDescription
Barcode

buildPartial()

public Barcode buildPartial()
Returns
TypeDescription
Barcode

clear()

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

clearField(Descriptors.FieldDescriptor field)

public Barcode.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Barcode.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Barcode.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Barcode.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Barcode getDefaultInstanceForType()
Returns
TypeDescription
Barcode

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for valueFormat.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Barcode other)

public Barcode.Builder mergeFrom(Barcode other)
Parameter
NameDescription
otherBarcode
Returns
TypeDescription
Barcode.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public Barcode.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The format to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for format to set.

Returns
TypeDescription
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
NameDescription
valueString

The rawValue to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for rawValue to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Barcode.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Barcode.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The valueFormat to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for valueFormat to set.

Returns
TypeDescription
Barcode.Builder

This builder for chaining.