# Gs1Handling enum

GS1 message handling options. The GS1 standard defines a key-value format for business-centric data that can be encoded into many 1D and 2D barcode types. https://ref.gs1.org/standards/genspecs/

GS1 messages have two representations or formats: a human-readable format and a machine-readable format. The human-readable format uses parentheses to wrap the keys in each pair. For example, the string "(01)012345678901(37)02(3922)00278" contains three AI keys: 01, 37, and 3922. The corresponding values are 012345678901, 02, and 00278.

The machine-readable format uses the special ASCII \x1D character to terminate key-value pairs in the string in cases where the given key implies that the value is variable-length. The equivalent machine-readable string for the above example is "010123456789013702\x1D392200278". In the above example, the 01 AI key is fixed-length, so the \x1D character is not necessary. The 37 AI keys is variable-length, so the \x1D character is necessary after the value in the pair. The 3922 AI key is also variable-length, but it is the last pair in the message, so the \x1D character is not necessary at the end.

The character \x1D is UNPRINTABLE - this means that if you try to print or otherwise visualize a GS1 message containing the \x1D character, you may see a number of different results, depending on how the system handles unprintable characters. You may see a question mark, a box, an escape sequence, a space or nothing at all.

Inheritance
  - Object
  - Enum
  - Gs1Handling
Available extensions
  - EnumName

## Values

PARSE → const Gs1Handling

  This is the default. GS1 messages are converted to the machine-readable format per the GS1 spec (the special FNC1 character is converted to ASCII \x1D). The implied 01 AI key is prepended to DataBar results. No validation is performed.

VALIDATE_STRUCTURE → const Gs1Handling

  Same as PARSE. Additionally, messages containing unknown AI keys, or containing values that don't fulfill the length, character set or regex requirements for known keys, are rejected.

DECODE_STRUCTURE → const Gs1Handling

  Same as VALIDATE_STRUCTURE. Additionally, GS1 strings are converted to the human-readable format, instead (with parentheses used to wrap AI keys, e.g. "(01)123456789"). The \x1D character is never used in this representation.

VALIDATE_FULL → const Gs1Handling

  Includes all validations from VALIDATE_STRUCTURE. Additionally, GS1 messages which have missing or incompatible combinations of AI keys are rejected. Additionally, values are checked against a list of known linting rules, e.g. checksums are calculated and verified, dates are checked for validity, etc. Results that fail any of the linter rules are rejected. The complete set of linter rules from the GS1 Syntax Dictionary are implemented.

DECODE_FULL → const Gs1Handling

  Combines the validations of VALIDATE_FULL and the human-readable output format of DECODE_STRUCTURE.

## Properties

hashCode → int
  The hash code for this object.
  no setter inherited
index → int
  A numeric identifier for the enumerated value.
  no setter inherited
name → String

  Available on Enum, provided by the EnumName extension

  The name of the enum value.
  no setter
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited

## Methods

noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  A string representation of this object.
  inherited

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited

## Constants

values → const List<Gs1Handling>
  A constant List of the values in this enum, in order of their declaration.