RotatingBarcode

JSON representation
{
  "type": enum (BarcodeType),
  "renderEncoding": enum (BarcodeRenderEncoding),
  "valuePattern": string,
  "totpDetails": {
    object (TotpDetails)
  },
  "alternateText": string,
  "showCodeText": {
    object (LocalizedString)
  },
  "initialRotatingBarcodeValues": {
    object (RotatingBarcodeValues)
  }
}
Fields
type

enum (BarcodeType)

The type of this barcode.

renderEncoding

enum (BarcodeRenderEncoding)

The render encoding for the barcode. When specified, barcode is rendered in the given encoding. Otherwise best known encoding is chosen by Google.

valuePattern

string

String encoded barcode value. This string supports the following substitutions: * {totp_value_n}: Replaced with the TOTP value (see TotpDetails.parameters). * {totp_timestamp_millis}: Replaced with the timestamp (millis since epoch) at which the barcode was generated. * {totp_timestamp_seconds}: Replaced with the timestamp (seconds since epoch) at which the barcode was generated.

totpDetails

object (TotpDetails)

Details used to evaluate the {totp_value_n} substitutions.

alternateText

string

An optional text that will override the default text that shows under the barcode. This field is intended for a human readable equivalent of the barcode value, used when the barcode cannot be scanned.

showCodeText

object (LocalizedString)

Optional text that will be shown when the barcode is hidden behind a click action. This happens in cases where a pass has Smart Tap enabled. If not specified, a default is chosen by Google.

initialRotatingBarcodeValues

object (RotatingBarcodeValues)

Input only. NOTE: This feature is only available for the transit vertical. Optional set of initial rotating barcode values. This allows a small subset of barcodes to be included with the object. Further rotating barcode values must be uploaded with the UploadRotatingBarcodeValues endpoint.

TotpDetails

Configuration for the time-based OTP substitutions. See https://tools.ietf.org/html/rfc6238

JSON representation
{
  "periodMillis": string,
  "algorithm": enum (TotpAlgorithm),
  "parameters": [
    {
      object (TotpParameters)
    }
  ]
}
Fields
periodMillis

string (int64 format)

The time interval used for the TOTP value generation, in milliseconds.

algorithm

enum (TotpAlgorithm)

The TOTP algorithm used to generate the OTP.

parameters[]

object (TotpParameters)

The TOTP parameters for each of the {totp_value_*} substitutions. The TotpParameters at index n is used for the {totp_value_n} substitution.

TotpAlgorithm

Enums
TOTP_ALGORITHM_UNSPECIFIED
TOTP_SHA1 TOTP algorithm from RFC 6238 with the SHA1 hash function

TotpParameters

Configuration for the key and value length. See https://www.rfc-editor.org/rfc/rfc4226#section-5.3

JSON representation
{
  "key": string,
  "valueLength": integer
}
Fields
key

string

The secret key used for the TOTP value generation, encoded as a Base16 string.

valueLength

integer

The length of the TOTP value in decimal digits.

RotatingBarcodeValues

A payload containing many barcode values and start date/time.

JSON representation
{
  "startDateTime": string,
  "values": [
    string
  ],
  "periodMillis": string
}
Fields
startDateTime

string

Required. The date/time the first barcode is valid from. Barcodes will be rotated through using periodMillis defined on the object's RotatingBarcodeValueInfo.

This is an ISO 8601 extended format date/time, with an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601).

For example:

1985-04-12T23:20:50.52Z would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.

1985-04-12T19:20:50.52-04:00 would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year.

values[]

string

Required. The values to encode in the barcode. At least one value is required.

periodMillis

string (int64 format)

Required. The amount of time each barcode is valid for.